(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 8.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[    276202,       6366]
NotebookOptionsPosition[    263248,       6009]
NotebookOutlinePosition[    263670,       6025]
CellTagsIndexPosition[    263627,       6022]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Control", "Title",
 CellChangeTimes->{{3.520873834546875*^9, 3.520873840984375*^9}, {
   3.520880951484375*^9, 3.520880952703125*^9}, 3.5353435216307597`*^9}],

Cell[BoxData[
 RowBox[{"<<", "C:\\\\Hopsan\\Compgen\\CompgenNG02.mx"}]], "Input",
 PageWidth->WindowWidth,
 CellChangeTimes->{{3.5039042069364696`*^9, 3.5039042084051447`*^9}, 
   3.5039043176026783`*^9, {3.503905207466113*^9, 3.5039052078411083`*^9}, {
   3.5039109774941587`*^9, 3.5039109827285337`*^9}, 3.51854719303125*^9, {
   3.520873875578125*^9, 3.520873903796875*^9}}],

Cell[BoxData[
 RowBox[{"Off", "[", 
  RowBox[{"General", "::", "\"\<spell1\>\""}], "]"}]], "Input",
 PageWidth->WindowWidth],

Cell[CellGroupData[{

Cell["Attitude Control", "Subtitle",
 CellChangeTimes->{{3.520873963671875*^9, 3.520873967265625*^9}, {
  3.541132435469144*^9, 3.541132437219043*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Signal\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<AttitudeControl\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Attitude control unit for an aircraft\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFile", "[", 
   RowBox[{"domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.520874016125*^9, 3.520874068265625*^9}, {
   3.52087448028125*^9, 3.52087450728125*^9}, 3.52087996896875*^9, {
   3.520880203578125*^9, 3.52088022325*^9}, {3.520932119625*^9, 
   3.5209321425*^9}, 3.5209322290625*^9, {3.520932736140625*^9, 
   3.520932737640625*^9}, 3.522342782453125*^9, {3.5256245293125*^9, 
   3.52562454328125*^9}, {3.526016819973899*^9, 3.5260168209582806`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "phiref", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Reference signal roll\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "thetaref", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Reference signal tip\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "psiref", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Reference signal yaw\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "phi", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<roll angle\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "theta", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<tipp angle\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "psi", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<yaw angle\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "beta", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<side slip angle\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "phimax", ",", "1.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Maximum bank angle for turn\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Rb", ",", "0.", ",", "double", ",", "\"\<rad/s\>\"", ",", 
       "\"\<yaw angle rate\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Ub", ",", "0.", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<actual speed\>\""}], "}"}]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520874548453125*^9, 3.520874548453125*^9}, {
  3.520874718671875*^9, 3.520874721046875*^9}, {3.520874755734375*^9, 
  3.520874766015625*^9}, {3.534151799828125*^9, 3.53415180021875*^9}, {
  3.541132456749168*^9, 3.5411324582022095`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "Kphi", ",", "3.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Gain roll\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Kphipsi", ",", "2.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Gain yaw/roll\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Kelev", ",", "4.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Gain tip, default\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Krud", ",", "1.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Gain yaw, default\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "KRrud", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Gain yaw rate, default\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"u1min", ",", 
       RowBox[{"-", ".9"}], ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Minium output signal roll\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "u1max", ",", ".9", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Maximum output signal roll\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"u2min", ",", 
       RowBox[{"-", ".7"}], ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Minium output signal tip\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "u2max", ",", ".7", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Maximum output signal tip\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"u3min", ",", 
       RowBox[{"-", ".7"}], ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Minium output signal yaw\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "u3max", ",", ".7", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Maximum output signal yaw\>\""}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "U0", ",", "100.", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<Reference speed for compensation\>\""}], "}"}]}], "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.520874584265625*^9, 3.520874584265625*^9}, {
   3.520874721515625*^9, 3.5208747834375*^9}, {3.52562634321875*^9, 
   3.5256264030625*^9}, 3.5261184740790405`*^9, {3.534151810859375*^9, 
   3.534151811265625*^9}, {3.5363116760362206`*^9, 3.5363116829580956`*^9}, {
   3.541132473795061*^9, 3.5411324745293937`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "uaerL", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<left aerleron\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "uaerR", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<right aerleron\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "uelev", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<elevator\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "urud", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<rudder\>\""}], "}"}]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520874568515625*^9, 3.520874568515625*^9}, {
  3.52087472571875*^9, 3.520874753328125*^9}, {3.520874792546875*^9, 
  3.520874801671875*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Kvexpr", "=", 
  FractionBox[
   SuperscriptBox["U0", "2"], 
   RowBox[{
    SuperscriptBox["U0", "2"], "+", 
    RowBox[{"Abs", "[", 
     SuperscriptBox["Ub", "2"], "]"}]}]]}]], "Input"],

Cell[BoxData[
 FractionBox[
  SuperscriptBox["U0", "2"], 
  RowBox[{
   SuperscriptBox["U0", "2"], "+", 
   SuperscriptBox[
    RowBox[{"Abs", "[", "Ub", "]"}], "2"]}]]], "Output",
 CellChangeTimes->{
  3.52088096003125*^9, 3.520932150671875*^9, 3.52093223328125*^9, 
   3.520932760265625*^9, 3.520932832078125*^9, 3.520933067734375*^9, 
   3.520933255546875*^9, 3.520933308296875*^9, 3.520933355609375*^9, 
   3.52093795728125*^9, 3.52093798928125*^9, 3.52093828271875*^9, 
   3.520938345515625*^9, 3.520938400234375*^9, 3.520938628078125*^9, {
   3.520938672953125*^9, 3.520938685921875*^9}, 3.5209387343125*^9, 
   3.52093878090625*^9, 3.52562455790625*^9, 3.5261171379328003`*^9, 
   3.526117229796587*^9, 3.5261185079401493`*^9, 3.5341355254375*^9, 
   3.534651836046875*^9, 3.5547157257712517`*^9, 3.5617101851588383`*^9, 
   3.5617105243787565`*^9, 3.56171395221352*^9, 3.568233869718148*^9, 
   3.568234833459271*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"localExpressions", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "Kv", ",", "Kvexpr", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Speed compensation factor\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"u1cmin", ",", 
       RowBox[{"Kv", " ", "u1min"}], ",", "double", ",", 
       RowBox[{"\"\<\>\"", ";", "\"\<min rudder deflection 1\>\""}]}], "}"}], 
     ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"u1cmax", ",", 
       RowBox[{"Kv", " ", "u1max"}], ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<max rudder deflection 1\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"u2cmin", ",", 
       RowBox[{"Kv", " ", "u2min"}], ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<min rudder deflection 2\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"u2cmax", ",", 
       RowBox[{"Kv", " ", "u2max"}], ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<max rudder deflection 2\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "u3cmin", ",", "u3min", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<min rudder deflection 3\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "u3cmax", ",", "u3max", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<max rudder deflection 3\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.52087472684375*^9, 3.52087472896875*^9}, {
  3.5223471696875*^9, 3.522347170765625*^9}, {3.53413052296875*^9, 
  3.53413053071875*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"yaerexpr", "   ", "=", " ", 
   RowBox[{
    RowBox[{"-", "Kv"}], " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"Kphi", " ", 
       RowBox[{"diffAngle", "[", 
        RowBox[{"phiref", ",", "phi"}], "]"}]}], "+", 
      RowBox[{"limit", "[", 
       RowBox[{
        RowBox[{"Kphipsi", " ", 
         RowBox[{"diffAngle", "[", 
          RowBox[{"psiref", ",", "psi"}], "]"}]}], ",", 
        RowBox[{"-", "phimax"}], ",", "phimax"}], "]"}]}], ")"}]}]}], " ", 
  ";"}], "\n", 
 RowBox[{
  RowBox[{"yelevexpr", " ", "=", " ", 
   RowBox[{
    RowBox[{"-", "Kv"}], " ", "Kelev", " ", 
    RowBox[{"(", 
     RowBox[{"diffAngle", "[", 
      RowBox[{"thetaref", ",", "theta"}], "]"}], " ", ")"}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"yrudexpr", "   ", "=", "  ", 
   RowBox[{
    RowBox[{"Krud", " ", "beta"}], " ", "-", 
    RowBox[{"Kv", " ", "KRrud", " ", "Rb"}]}]}], ";"}]}], "Input",
 CellChangeTimes->{
  3.520874640046875*^9, 3.520874692546875*^9, {3.5209330574375*^9, 
   3.520933060859375*^9}, 3.525580570849698*^9, {3.53413054015625*^9, 
   3.5341305480625*^9}, {3.534151750078125*^9, 3.534151759390625*^9}, {
   3.5411325060900755`*^9, 3.5411325068712807`*^9}, {3.561710131810504*^9, 
   3.56171013497182*^9}, {3.561711077350048*^9, 3.5617110826935825`*^9}, {
   3.561713646190921*^9, 3.5617136585041523`*^9}, {3.5617138945097504`*^9, 
   3.5617138960869083`*^9}, 3.561713940943393*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", "\t", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"uaerL", ",", 
       RowBox[{"limit", "[", 
        RowBox[{
         RowBox[{"-", "yaerexpr"}], ",", "u1cmin", ",", "u1cmax"}], "]"}]}], 
      "}"}], ",", "\[IndentingNewLine]", "\t", 
     RowBox[{"{", 
      RowBox[{"uaerR", ",", 
       RowBox[{"limit", "[", 
        RowBox[{"yaerexpr", ",", "u1cmin", ",", "u1cmax"}], "]"}]}], "}"}], 
     ",", "\[IndentingNewLine]", "\t", 
     RowBox[{"{", 
      RowBox[{"uelev", ",", 
       RowBox[{"limit", "[", 
        RowBox[{"yelevexpr", ",", "u2cmin", ",", "u2cmax"}], "]"}]}], "}"}], 
     ",", "\[IndentingNewLine]", "\t", 
     RowBox[{"{", 
      RowBox[{"urud", ",", 
       RowBox[{"limit", "[", 
        RowBox[{"yrudexpr", ",", "u3cmin", ",", "u3cmax"}], "]"}]}], "}"}]}], 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520874644515625*^9, 3.5208746525*^9}, {
   3.5208746850625*^9, 3.520874689984375*^9}, 3.520932942234375*^9, 
   3.536319993245064*^9, 3.5411325146833305`*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input",
 CellChangeTimes->{{3.520938682*^9, 3.520938682484375*^9}, {
  3.5411325204486237`*^9, 3.5411325215110626`*^9}}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partw"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part \[NoBreak]\\!\\(5\\)\[NoBreak] of \
\[NoBreak]\\!\\({\\(\\({uaerL, 0.`, double, \\\"rad\\\", \\\"left \
aerleron\\\"}\\)\\), \\(\\({uaerR, 0.`, double, \\\"rad\\\", \\\"right \
aerleron\\\"}\\)\\), \\(\\({uelev, 0.`, double, \\\"rad\\\", \
\\\"elevator\\\"}\\)\\), \\(\\({urud, 0.`, double, \\\"rad\\\", \
\\\"rudder\\\"}\\)\\)}\\)\[NoBreak] does not exist. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partw\\\", ButtonNote -> \
\\\"Part::partw\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.5682348335212746`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partw"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part \[NoBreak]\\!\\(6\\)\[NoBreak] of \
\[NoBreak]\\!\\({\\(\\({uaerL, 0.`, double, \\\"rad\\\", \\\"left \
aerleron\\\"}\\)\\), \\(\\({uaerR, 0.`, double, \\\"rad\\\", \\\"right \
aerleron\\\"}\\)\\), \\(\\({uelev, 0.`, double, \\\"rad\\\", \
\\\"elevator\\\"}\\)\\), \\(\\({urud, 0.`, double, \\\"rad\\\", \
\\\"rudder\\\"}\\)\\)}\\)\[NoBreak] does not exist. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partw\\\", ButtonNote -> \
\\\"Part::partw\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.568234833534275*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partw"}], "MessageName"], ":", 
  " ", "\<\"Part \[NoBreak]\\!\\(7\\)\[NoBreak] of \
\[NoBreak]\\!\\({\\(\\({uaerL, 0.`, double, \\\"rad\\\", \\\"left \
aerleron\\\"}\\)\\), \\(\\({uaerR, 0.`, double, \\\"rad\\\", \\\"right \
aerleron\\\"}\\)\\), \\(\\({uelev, 0.`, double, \\\"rad\\\", \
\\\"elevator\\\"}\\)\\), \\(\\({urud, 0.`, double, \\\"rad\\\", \
\\\"rudder\\\"}\\)\\)}\\)\[NoBreak] does not exist. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partw\\\", ButtonNote -> \
\\\"Part::partw\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.5682348335352755`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Part :: \
partw\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.5682348335372753`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"SignalAttitudeControl\\\"\\)\\), \
\\(\\(\\\"displayname\\\" \[Rule] \\\"SignalAttitudeControl\\\"\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"SignalAttitudeControl.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"SignalAttitudeControl.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] 0.09090909090909091`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Pphiref\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\
\[LeftSkeleton] 12 \[RightSkeleton]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.8\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Purud\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\(\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\) \[Rule] \
\\(\\(\[LeftSkeleton] 5 \[RightSkeleton]\\)\\)}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"SignalAttitudeControl\\\"\\)\\), \\(\\(\\(\\(\\\"dis\\\" \
\[Ellipsis] \\\"ame\\\"\\)\\) \[Rule] \\(\\(\\\"\\\" \[Ellipsis] \
\\\"\\\"\\)\\)\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \
\\(\\({\\(\\(\\\"isopath\\\" \[Rule] \\\"SignalAttitudeControl.svg\\\"\\)\\), \
\\(\\(\\\"iconrotation\\\" \[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \
\[Rule] \\\"SignalAttitudeControl.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\
\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \\(\\({\
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
0.09090909090909091`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\
\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Pphiref\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\
\[LeftSkeleton] 12 \[RightSkeleton]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.8\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Purud\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.568234833553276*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.5682348335552764`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.09090909090909091`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.09090909090909091`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.5682348335552764`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.5682348335562763`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.18181818181818182`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.18181818181818182`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.5682348335572767`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.5682348335582767`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.5682348335592766`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.2727272727272727`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.2727272727272727`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.568234833560277*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.5682338697901525`*^9, 
  3.568234833561277*^9}],

Cell[BoxData["\<\"SignalAttitudeControl.xml\"\>"], "Output",
 CellChangeTimes->{3.5341355259375*^9, 3.5346518395*^9, 
  3.5547157258337374`*^9, 3.5617101865269747`*^9, 3.561710524640783*^9, 
  3.561713952497548*^9, 3.5682338698291545`*^9, 3.568234833561277*^9}]
}, Closed]]
}, Open  ]],

Cell[CellGroupData[{

Cell["AttitudeTVCcontrol", "Subtitle",
 CellChangeTimes->{{3.520873963671875*^9, 3.520873967265625*^9}, {
  3.541132435469144*^9, 3.541132437219043*^9}, {3.5682331515180693`*^9, 
  3.568233154969267*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Signal\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<AttitudeTVCcontrol\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Attitude control unit for an aircraft\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFile", "[", 
   RowBox[{"domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.520874016125*^9, 3.520874068265625*^9}, {
   3.52087448028125*^9, 3.52087450728125*^9}, 3.52087996896875*^9, {
   3.520880203578125*^9, 3.52088022325*^9}, {3.520932119625*^9, 
   3.5209321425*^9}, 3.5209322290625*^9, {3.520932736140625*^9, 
   3.520932737640625*^9}, 3.522342782453125*^9, {3.5256245293125*^9, 
   3.52562454328125*^9}, {3.526016819973899*^9, 3.5260168209582806`*^9}, {
   3.5682331616946516`*^9, 3.568233168555044*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "thetaref", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Reference signal tip\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "psiref", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Reference signal yaw\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "phi", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<roll angle\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "theta", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<tipp angle\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "psi", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<yaw angle\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Qb", ",", "0.", ",", "double", ",", "\"\<rad/s\>\"", ",", 
       "\"\<tip angle rate\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Rb", ",", "0.", ",", "double", ",", "\"\<rad/s\>\"", ",", 
       "\"\<yaw angle rate\>\""}], "}"}]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520874548453125*^9, 3.520874548453125*^9}, {
   3.520874718671875*^9, 3.520874721046875*^9}, {3.520874755734375*^9, 
   3.520874766015625*^9}, {3.534151799828125*^9, 3.53415180021875*^9}, {
   3.541132456749168*^9, 3.5411324582022095`*^9}, {3.568233613386487*^9, 
   3.5682336369468346`*^9}, 3.568234801225427*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "Kelev", ",", "4.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Gain tip, default\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Krud", ",", "1.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Gain yaw, default\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "KQrud", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Gain tip rate, default\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "KRrud", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Gain yaw rate, default\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"umin", ",", 
       RowBox[{"-", ".9"}], ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Minium output signal roll\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "umax", ",", ".9", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Maximum output signal roll\>\""}], "}"}]}], "\[IndentingNewLine]",
     "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520874584265625*^9, 3.520874584265625*^9}, {
   3.520874721515625*^9, 3.5208747834375*^9}, {3.52562634321875*^9, 
   3.5256264030625*^9}, 3.5261184740790405`*^9, {3.534151810859375*^9, 
   3.534151811265625*^9}, {3.5363116760362206`*^9, 3.5363116829580956`*^9}, {
   3.541132473795061*^9, 3.5411324745293937`*^9}, 3.5682331863300605`*^9, {
   3.568233441160636*^9, 3.568233475835619*^9}, {3.5682335533470526`*^9, 
   3.568233566922829*^9}, 3.568233864638858*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "uelev", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<elevator\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "urud", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<rudder\>\""}], "}"}]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520874568515625*^9, 3.520874568515625*^9}, {
   3.52087472571875*^9, 3.520874753328125*^9}, {3.520874792546875*^9, 
   3.520874801671875*^9}, 3.5682334331201763`*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"yelevexpr", " ", "=", " ", 
   RowBox[{"Kelev", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"diffAngle", "[", 
       RowBox[{"thetaref", ",", "theta"}], "]"}], "-", 
      RowBox[{"KQrud", " ", "Qb"}]}], " ", ")"}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"yrudexpr", "   ", "=", "  ", 
   RowBox[{"Krud", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"diffAngle", "[", 
       RowBox[{"psiref", ",", "psi"}], "]"}], " ", "-", 
      RowBox[{"KRrud", " ", "Rb"}]}], ")"}]}]}], ";"}]}], "Input",
 CellChangeTimes->{
  3.520874640046875*^9, 3.520874692546875*^9, {3.5209330574375*^9, 
   3.520933060859375*^9}, 3.525580570849698*^9, {3.53413054015625*^9, 
   3.5341305480625*^9}, {3.534151750078125*^9, 3.534151759390625*^9}, {
   3.5411325060900755`*^9, 3.5411325068712807`*^9}, {3.561710131810504*^9, 
   3.56171013497182*^9}, {3.561711077350048*^9, 3.5617110826935825`*^9}, {
   3.561713646190921*^9, 3.5617136585041523`*^9}, {3.5617138945097504`*^9, 
   3.5617138960869083`*^9}, 3.561713940943393*^9, {3.5682332892719483`*^9, 
   3.568233380330157*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", "\t", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"uelev", ",", 
       RowBox[{"limit", "[", 
        RowBox[{"yelevexpr", ",", "umin", ",", "umax"}], "]"}]}], "}"}], ",", 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"{", 
      RowBox[{"urud", ",", 
       RowBox[{"limit", "[", 
        RowBox[{"yrudexpr", ",", "umin", ",", "umax"}], "]"}]}], "}"}]}], 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520874644515625*^9, 3.5208746525*^9}, {
   3.5208746850625*^9, 3.520874689984375*^9}, 3.520932942234375*^9, 
   3.536319993245064*^9, 3.5411325146833305`*^9, 3.5682334073367014`*^9, {
   3.568233516220929*^9, 3.5682335328128786`*^9}, {3.5682335690499506`*^9, 
   3.568233574317252*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input",
 CellChangeTimes->{{3.520938682*^9, 3.520938682484375*^9}, {
  3.5411325204486237`*^9, 3.5411325215110626`*^9}}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\(\\(\\\"\\\" \[Ellipsis] \
\\\"\\\"\\)\\)\\)\\), \\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"SignalAttitudeTVCcontrol.svg\\\"\\)\\), \
\\(\\(\\\"iconrotation\\\" \[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \
\[Rule] \\\"SignalAttitudeTVCcontrol.svg\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \
\\(\\({}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\
\\\"x\\\" \[Rule] 0.125`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Pthetaref\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] 0.25`\
\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \[Rule] \
\\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Ppsiref\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\[LeftSkeleton] 6 \[RightSkeleton]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.666667\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Purud\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\(\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\) \[Rule] \
\\(\\(\[LeftSkeleton] 5 \[RightSkeleton]\\)\\)}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"SignalAttitudeTVCcontrol\\\"\\)\\), \\(\\(\\(\\(\\\"di\\\" \
\[Ellipsis] \\\"ame\\\"\\)\\) \[Rule] \\(\\(\\\"\\\" \[Ellipsis] \
\\\"\\\"\\)\\)\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \
\\(\\({\\(\\(\\\"isopath\\\" \[Rule] \
\\\"SignalAttitudeTVCcontrol.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"SignalAttitudeTVCcontrol.svg\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \
\\(\\({}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\
\\\"x\\\" \[Rule] 0.125`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Pthetaref\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\
\[LeftSkeleton] 7 \[RightSkeleton]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpose\
\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \\\"0.666667\\\"\\)\\), \\(\\(\\\"y\\\" \
\[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \
\\(\\(\\\"name\\\" \[Rule] \\\"Purud\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.568233661611245*^9, 
  3.5682338699841633`*^9, 3.5682348337152853`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.568233661611245*^9, 
  3.5682338699841633`*^9, 3.568234833720286*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.125`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.125`\\)\[NoBreak] is not a valid value \
for an attribute in an XMLElement. The value of the attribute must be a \
string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.568233661611245*^9, 
  3.5682338699841633`*^9, 3.568234833721286*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.568233661611245*^9, 
  3.5682338699841633`*^9, 3.5682348337232857`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.25`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.25`\\)\[NoBreak] is not a valid value for \
an attribute in an XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.568233661611245*^9, 
  3.5682338699841633`*^9, 3.568234833724286*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.568233661611245*^9, 
  3.5682338699841633`*^9, 3.5682348337262864`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.568233661611245*^9, 
  3.5682338699841633`*^9, 3.5682348337272863`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.375`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.375`\\)\[NoBreak] is not a valid value \
for an attribute in an XMLElement. The value of the attribute must be a \
string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.568233661611245*^9, 
  3.5682338699841633`*^9, 3.5682348337282867`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.525624557984375*^9, 3.526117138026555*^9, 
  3.526117229843464*^9, 3.526118508002652*^9, 3.5341355258125*^9, 
  3.53465183875*^9, 3.554715725818116*^9, 3.5617101854838705`*^9, 
  3.561710524540773*^9, 3.5617139523965387`*^9, 3.568233661611245*^9, 
  3.5682338699841633`*^9, 3.568234833729286*^9}],

Cell[BoxData["\<\"SignalAttitudeTVCcontrol.xml\"\>"], "Output",
 CellChangeTimes->{3.5341355259375*^9, 3.5346518395*^9, 
  3.5547157258337374`*^9, 3.5617101865269747`*^9, 3.561710524640783*^9, 
  3.561713952497548*^9, 3.5682336616242456`*^9, 3.568233869998164*^9, 
  3.568234833731286*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["Subtract Angle", "Subtitle",
 CellChangeTimes->{{3.520873963671875*^9, 3.520873967265625*^9}, {
  3.541132435469144*^9, 3.541132437219043*^9}, {3.5682331515180693`*^9, 
  3.568233154969267*^9}, {3.569437621137436*^9, 3.5694376315190296`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Signal\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<SubtractAngle\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Subtract angles from each other\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFile", "[", 
   RowBox[{"domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.520874016125*^9, 3.520874068265625*^9}, {
   3.52087448028125*^9, 3.52087450728125*^9}, 3.52087996896875*^9, {
   3.520880203578125*^9, 3.52088022325*^9}, {3.520932119625*^9, 
   3.5209321425*^9}, 3.5209322290625*^9, {3.520932736140625*^9, 
   3.520932737640625*^9}, 3.522342782453125*^9, {3.5256245293125*^9, 
   3.52562454328125*^9}, {3.526016819973899*^9, 3.5260168209582806`*^9}, {
   3.5682331616946516`*^9, 3.568233168555044*^9}, {3.569437642125636*^9, 
   3.569437662108779*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "theta1", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Angle 1\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "theta2", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Angle 2\>\""}], "}"}]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520874548453125*^9, 3.520874548453125*^9}, {
   3.520874718671875*^9, 3.520874721046875*^9}, {3.520874755734375*^9, 
   3.520874766015625*^9}, {3.534151799828125*^9, 3.53415180021875*^9}, {
   3.541132456749168*^9, 3.5411324582022095`*^9}, {3.568233613386487*^9, 
   3.5682336369468346`*^9}, 3.568234801225427*^9, {3.5694376738834524`*^9, 
   3.5694377065633216`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
     "thetadiff", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
      "\"\<diff angle\>\""}], "}"}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520874568515625*^9, 3.520874568515625*^9}, {
   3.52087472571875*^9, 3.520874753328125*^9}, {3.520874792546875*^9, 
   3.520874801671875*^9}, 3.5682334331201763`*^9, {3.569437719159042*^9, 
   3.569437738404143*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"thetadiff", " ", "=", " ", 
   RowBox[{"diffAngle", "[", 
    RowBox[{"theta1", ",", "theta2"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{
  3.520874640046875*^9, 3.520874692546875*^9, {3.5209330574375*^9, 
   3.520933060859375*^9}, 3.525580570849698*^9, {3.53413054015625*^9, 
   3.5341305480625*^9}, {3.534151750078125*^9, 3.534151759390625*^9}, {
   3.5411325060900755`*^9, 3.5411325068712807`*^9}, {3.561710131810504*^9, 
   3.56171013497182*^9}, {3.561711077350048*^9, 3.5617110826935825`*^9}, {
   3.561713646190921*^9, 3.5617136585041523`*^9}, {3.5617138945097504`*^9, 
   3.5617138960869083`*^9}, 3.561713940943393*^9, {3.5682332892719483`*^9, 
   3.568233380330157*^9}, {3.5694377469506316`*^9, 3.569437773622157*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input",
 CellChangeTimes->{{3.520938682*^9, 3.520938682484375*^9}, {
  3.5411325204486237`*^9, 3.5411325215110626`*^9}}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Set", "::", "noval"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Symbol \[NoBreak]\\!\\(declaredVariables\\)\[NoBreak] in \
part assignment does not have an immediate value. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/noval\\\", ButtonNote -> \
\\\"Set::noval\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.569438396560787*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"SignalSubtractAngle\\\"\\)\\), \
\\(\\(\\\"displayname\\\" \[Rule] \\\"SignalSubtractAngle\\\"\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"SignalSubtractAngle.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"SignalSubtractAngle.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.569438396700795*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.569438396726797*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.3333333333333333`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.3333333333333333`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.569438396746798*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.569438396748798*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.6666666666666666`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.6666666666666666`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.569438396749798*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.569438396750798*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.569438396765799*^9}],

Cell[BoxData["\<\"SignalSubtractAngle.xml\"\>"], "Output",
 CellChangeTimes->{
  3.5341355259375*^9, 3.5346518395*^9, 3.5547157258337374`*^9, 
   3.5617101865269747`*^9, 3.561710524640783*^9, 3.561713952497548*^9, 
   3.5682336616242456`*^9, 3.568233869998164*^9, 3.568234833731286*^9, {
   3.5694383844720955`*^9, 3.5694383967787995`*^9}}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["Pilead", "Subtitle",
 CellChangeTimes->{{3.520880011078125*^9, 3.520880015078125*^9}, {
  3.520938836109375*^9, 3.52093884040625*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Signal\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<PIlead\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{
  "brief", "=", "\"\<PI-controler with lead filter in feadback path\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFile", "[", 
   RowBox[{"domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.520880152296875*^9, 3.520880230078125*^9}, 
   3.520932125875*^9, 3.520932753984375*^9, {3.52093324790625*^9, 
   3.520933251453125*^9}, {3.521775289609375*^9, 3.521775289921875*^9}, {
   3.52249560790625*^9, 3.522495611953125*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", ":=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "wa", ",", "1.", ",", "double", ",", "\"\<rad/s\>\"", ",", 
       "\"\<Break frequency\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "da", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<relative damping\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"umin", ",", 
       RowBox[{"-", "1."}], ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Minium output signal\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "umax", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Maximum output signal\>\""}], "}"}]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520933349796875*^9, 3.5209333498125*^9}, {
   3.520938265609375*^9, 3.520938271921875*^9}, {3.52094199159375*^9, 
   3.520941998328125*^9}, 3.520942056578125*^9, 3.521775446796875*^9, 
   3.52177700921875*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", ":=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "yref", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Reference value\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "y", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Actual value\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "kx", ",", "1.", ",", "double", ",", "\"\<rad/s\>\"", ",", 
       "\"\<Break frequency\>\""}], "}"}]}], "\n", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520880034703125*^9, 3.520880034703125*^9}, {
  3.520932825078125*^9, 3.520932825328125*^9}, {3.521777012078125*^9, 
  3.52177702803125*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", ":=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
     "u", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
      "\"\<control signal\>\""}], "}"}], "\n", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.52088004696875*^9, 3.520880046984375*^9}, 
   3.520932825859375*^9, {3.5217770334375*^9, 3.521777033828125*^9}}],

Cell[BoxData[
 RowBox[{"s", "=."}]], "Input",
 CellChangeTimes->{{3.522497345015625*^9, 3.522497346375*^9}}],

Cell[BoxData[
 RowBox[{"uLaplace", ":=", 
  RowBox[{"Simplify", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"k1", 
      RowBox[{"(", 
       RowBox[{"1", "+", 
        FractionBox["w11", "s"]}], ")"}], "yref"}], "-", 
     RowBox[{"k1", 
      RowBox[{"(", 
       RowBox[{"1", "+", 
        FractionBox["w11", "s"]}], ")"}], 
      FractionBox[
       RowBox[{"(", 
        RowBox[{"1", "+", 
         FractionBox["s", "w21"]}], ")"}], 
       RowBox[{"(", 
        RowBox[{"1", "+", 
         FractionBox["s", "w22"]}], ")"}]], "y"}]}], ",", 
    RowBox[{"Assumptions", "->", "$Assumptions"}]}], "]"}]}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Simplify", "[", 
  RowBox[{"k1", 
   RowBox[{"(", 
    RowBox[{"1", "+", 
     FractionBox["w11", "s"]}], ")"}], 
   FractionBox[
    RowBox[{"(", 
     RowBox[{"1", "+", 
      FractionBox["s", "w21"]}], ")"}], 
    RowBox[{"(", 
     RowBox[{"1", "+", 
      FractionBox["s", "w22"]}], ")"}]]}], "]"}]], "Input",
 CellChangeTimes->{{3.522500518609375*^9, 3.52250053384375*^9}}],

Cell[BoxData[
 FractionBox[
  RowBox[{"wa", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{"2", " ", "da", " ", "s"}], "+", "wa"}], ")"}]}], 
  RowBox[{"kx", " ", "s"}]]], "Output",
 CellChangeTimes->{{3.52250051378125*^9, 3.52250053721875*^9}, 
   3.522518308484375*^9, 3.522518974453125*^9, 3.5225510339635983`*^9, 
   3.5225632118883753`*^9, 3.538977625802286*^9, 3.5389824037733216`*^9, 
   3.5389866671143527`*^9, 3.5547157258649807`*^9, 3.5682338701091704`*^9, 
   3.568234833841293*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["uLaplace"], "Input"],

Cell[BoxData[
 RowBox[{"-", 
  FractionBox[
   RowBox[{"wa", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"2", " ", "da", " ", "s", " ", "y"}], "+", 
      RowBox[{"wa", " ", 
       RowBox[{"(", 
        RowBox[{"y", "-", "yref"}], ")"}]}], "-", 
      RowBox[{"s", " ", "yref"}]}], ")"}]}], 
   RowBox[{"kx", " ", "s"}]]}]], "Output",
 CellChangeTimes->{3.52249729465625*^9, 3.522497354625*^9, 
  3.522518308515625*^9, 3.522518974484375*^9, 3.5225510339948454`*^9, 
  3.5225632119196253`*^9, 3.538977625833536*^9, 3.5389824038045716`*^9, 
  3.5389866671456027`*^9, 3.554715725896223*^9, 3.5682338701461725`*^9, 
  3.5682348338742948`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"da", "=."}]], "Input",
 CellChangeTimes->{{3.522497553859375*^9, 3.52249756740625*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"variableLimits", "=", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"u", ",", "umin", ",", "umax"}], "}"}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.52177608059375*^9, 3.5217761093125*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"k1", ":=", 
   FractionBox["wa", "kx"]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"w11", ":=", "wa"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"w21", ":=", 
   FractionBox["wa", 
    RowBox[{"2", " ", "da"}]]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"w22", ":=", "wa"}], ";"}]}], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemEquationsDa", "=", 
   RowBox[{"{", 
    RowBox[{"u", "-", "uLaplace"}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.5208800815625*^9, 3.52088011071875*^9}, {
  3.521775605125*^9, 3.521775606578125*^9}, {3.52177591884375*^9, 
  3.52177592178125*^9}}],

Cell[CellGroupData[{

Cell[BoxData["systemEquationsDa"], "Input",
 CellChangeTimes->{{3.521775601140625*^9, 3.52177560165625*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"u", "+", 
   FractionBox[
    RowBox[{"wa", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"2", " ", "da", " ", "s", " ", "y"}], "+", 
       RowBox[{"wa", " ", 
        RowBox[{"(", 
         RowBox[{"y", "-", "yref"}], ")"}]}], "-", 
       RowBox[{"s", " ", "yref"}]}], ")"}]}], 
    RowBox[{"kx", " ", "s"}]]}], "}"}]], "Output",
 CellChangeTimes->{3.522518308703125*^9, 3.522518974578125*^9, 
  3.5225510340729623`*^9, 3.5225632120133753`*^9, 3.538977626036661*^9, 
  3.538982403976447*^9, 3.538986667223727*^9, 3.554715725927466*^9, 
  3.568233870228177*^9, 3.568234833945299*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Numerator", "[", 
  RowBox[{"Together", "[", 
   RowBox[{"{", 
    RowBox[{"u", "-", 
     FractionBox[
      RowBox[{"wa", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"-", "4"}], " ", "da", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "1"}], "+", "qi00"}], ")"}], " ", "y"}], "+", 
         RowBox[{"mTimestep", " ", 
          RowBox[{"(", 
           RowBox[{"1", "+", "qi00"}], ")"}], " ", "wa", " ", 
          RowBox[{"(", 
           RowBox[{"y", "-", "yref"}], ")"}]}], "+", 
         RowBox[{"2", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "1"}], "+", "qi00"}], ")"}], " ", "yref"}]}], 
        ")"}]}], 
      RowBox[{"2", " ", "kx", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "qi00"}], ")"}]}]]}], "}"}], "]"}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.522501304015625*^9, 3.522501337859375*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{
    RowBox[{"-", "2"}], " ", "kx", " ", "u"}], "+", 
   RowBox[{"2", " ", "kx", " ", "qi00", " ", "u"}], "-", 
   RowBox[{"4", " ", "da", " ", "wa", " ", "y"}], "+", 
   RowBox[{"4", " ", "da", " ", "qi00", " ", "wa", " ", "y"}], "-", 
   RowBox[{"mTimestep", " ", 
    SuperscriptBox["wa", "2"], " ", "y"}], "-", 
   RowBox[{"mTimestep", " ", "qi00", " ", 
    SuperscriptBox["wa", "2"], " ", "y"}], "+", 
   RowBox[{"2", " ", "wa", " ", "yref"}], "-", 
   RowBox[{"2", " ", "qi00", " ", "wa", " ", "yref"}], "+", 
   RowBox[{"mTimestep", " ", 
    SuperscriptBox["wa", "2"], " ", "yref"}], "+", 
   RowBox[{"mTimestep", " ", "qi00", " ", 
    SuperscriptBox["wa", "2"], " ", "yref"}]}], "}"}]], "Output",
 CellChangeTimes->{3.522501304171875*^9, 3.522501339203125*^9, 
  3.52251830871875*^9, 3.522518974609375*^9, 3.522551034104209*^9, 
  3.5225632120446253`*^9, 3.538977626052286*^9, 3.538982404007697*^9, 
  3.5389866672549767`*^9, 3.5547157259430876`*^9, 3.5682338702631793`*^9, 
  3.5682348339713*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemVariables", "=", 
   RowBox[{"{", "u", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520880113609375*^9, 3.520880127703125*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(1, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.5682348340253034`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Set", "::", "noval"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Symbol \[NoBreak]\\!\\(inputParameters\\)\[NoBreak] in \
part assignment does not have an immediate value. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/noval\\\", ButtonNote -> \
\\\"Set::noval\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.568234834036304*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Set", "::", "noval"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Symbol \[NoBreak]\\!\\(inputParameters\\)\[NoBreak] in \
part assignment does not have an immediate value. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/noval\\\", ButtonNote -> \
\\\"Set::noval\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.568234834037304*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Set", "::", "noval"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Symbol \[NoBreak]\\!\\(inputParameters\\)\[NoBreak] in \
part assignment does not have an immediate value. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/noval\\\", ButtonNote -> \
\\\"Set::noval\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.568234834037304*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Set :: \
noval\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.5682348340383043`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"SignalPIlead.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \[Rule] \\\
\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"SignalPIlead.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] 0.25`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Pyref\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\
\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] 0.5`\\)\\), \\(\\(\\\"y\\\
\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \
\\(\\(\\\"name\\\" \[Rule] \\\"Py\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\
\\(\\(\\\"x\\\" \[Rule] 0.75`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \
\\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\
\"Pkx\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.5\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Pu\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.5682348340393043`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.5682348340393043`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.25`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.25`\\)\[NoBreak] is not a valid value for \
an attribute in an XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.568234834040304*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.568234834040304*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.5`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"x\
\\\" \[Rule] 0.5`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.5682348340413046`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.5682348340423045`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.5682348340423045`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.75`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.75`\\)\[NoBreak] is not a valid value for \
an attribute in an XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.5682348340433044`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.521775515296875*^9, 3.5217756104375*^9, 
  3.521775926828125*^9, 3.521776121671875*^9, 3.522495664796875*^9, 
  3.522518308765625*^9, 3.52251897465625*^9, 3.522551034135456*^9, 
  3.5225632120915003`*^9, 3.538977626099161*^9, 3.5389824040858216`*^9, 
  3.5389866673799763`*^9, 3.5547157259899516`*^9, 3.568233870327183*^9, 
  3.5682348340433044`*^9}],

Cell[BoxData["\<\"SignalPIlead.xml\"\>"], "Output",
 CellChangeTimes->{3.538977626099161*^9, 3.538982404351447*^9, 
  3.5389866674893503`*^9, 3.554715726161787*^9, 3.568233870362185*^9, 
  3.5682348340443044`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["PID", "Subtitle",
 CellChangeTimes->{{3.520880011078125*^9, 3.520880015078125*^9}, {
  3.520938836109375*^9, 3.52093884040625*^9}, {3.5353435419770145`*^9, 
  3.535343542351199*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Signal\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<PID\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<PID controller\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFile", "[", 
   RowBox[{"domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.520880152296875*^9, 3.520880230078125*^9}, 
   3.520932125875*^9, 3.520932753984375*^9, {3.52093324790625*^9, 
   3.520933251453125*^9}, {3.521775289609375*^9, 3.521775289921875*^9}, {
   3.52249560790625*^9, 3.522495611953125*^9}, {3.5353435506144285`*^9, 
   3.5353435625103617`*^9}, 3.55084142603125*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", ":=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "Kp", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Proportional gain\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "KI", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Integral gain\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Kd", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Differential gain\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"umin", ",", 
       RowBox[{"-", "1."}], ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Minium output signal\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "umax", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Maximum output signal\>\""}], "}"}]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520933349796875*^9, 3.5209333498125*^9}, {
   3.520938265609375*^9, 3.520938271921875*^9}, {3.52094199159375*^9, 
   3.520941998328125*^9}, 3.520942056578125*^9, 3.521775446796875*^9, 
   3.52177700921875*^9, {3.53534356809194*^9, 3.535343632888136*^9}, 
   3.5353437390628457`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", ":=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "yref", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Reference value\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "y", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Actual value\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "dy", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Differential of actual value\>\""}], "}"}]}], "\n", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.520880034703125*^9, 3.520880034703125*^9}, {
  3.520932825078125*^9, 3.520932825328125*^9}, {3.521777012078125*^9, 
  3.52177702803125*^9}, {3.5353436227072124`*^9, 3.5353436587224226`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", ":=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
     "u", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
      "\"\<control signal\>\""}], "}"}], "\n", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.52088004696875*^9, 3.520880046984375*^9}, 
   3.520932825859375*^9, {3.5217770334375*^9, 3.521777033828125*^9}}],

Cell[BoxData[
 RowBox[{"s", "=."}]], "Input",
 CellChangeTimes->{{3.522497345015625*^9, 3.522497346375*^9}}],

Cell[BoxData[
 RowBox[{"uLaplace", ":=", 
  RowBox[{"Simplify", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"(", 
      RowBox[{"Kp", "+", 
       FractionBox["KI", "s"]}], ")"}], " ", 
     RowBox[{"(", 
      RowBox[{"yref", "-", "y"}], ")"}]}], " ", "-", " ", 
    RowBox[{"Kd", " ", "dy"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.535343699118704*^9, 3.535343744161103*^9}, 
   3.535343798271106*^9, {3.550550125982275*^9, 3.5505501263260355`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemEquationsDa", "=", 
   RowBox[{"{", 
    RowBox[{"u", "-", "uLaplace"}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.5208800815625*^9, 3.52088011071875*^9}, {
  3.521775605125*^9, 3.521775606578125*^9}, {3.52177591884375*^9, 
  3.52177592178125*^9}}],

Cell[CellGroupData[{

Cell[BoxData["systemEquationsDa"], "Input",
 CellChangeTimes->{{3.521775601140625*^9, 3.52177560165625*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"dy", " ", "Kd"}], "+", "u", "-", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"Kp", "+", 
      FractionBox["KI", "s"]}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "y"}], "+", "yref"}], ")"}]}]}], "}"}]], "Output",
 CellChangeTimes->{3.522518308703125*^9, 3.522518974578125*^9, 
  3.5225510340729623`*^9, 3.5225632120133753`*^9, 3.538977626177286*^9, 
  3.538982404757697*^9, 3.538986667567475*^9, 3.5547157262086515`*^9, 
  3.568233870665202*^9, 3.5682348341453104`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"variableLimits", "=", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"u", ",", "umin", ",", "umax"}], "}"}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.52177608059375*^9, 3.5217761093125*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemVariables", "=", 
   RowBox[{"{", "u", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.520880113609375*^9, 3.520880127703125*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(1, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.568234834189313*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Set", "::", "noval"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Symbol \[NoBreak]\\!\\(inputParameters\\)\[NoBreak] in \
part assignment does not have an immediate value. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/noval\\\", ButtonNote -> \
\\\"Set::noval\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.568234834194313*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Set", "::", "noval"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Symbol \[NoBreak]\\!\\(inputParameters\\)\[NoBreak] in \
part assignment does not have an immediate value. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/noval\\\", ButtonNote -> \
\\\"Set::noval\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.568234834194313*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Set", "::", "noval"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Symbol \[NoBreak]\\!\\(inputParameters\\)\[NoBreak] in \
part assignment does not have an immediate value. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/noval\\\", ButtonNote -> \
\\\"Set::noval\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.5682348341953135`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Set :: \
noval\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.568234834196313*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"SignalPID.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \[Rule] \
\\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \\\"SignalPID.svg\\\"\\)\\)}\
\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpositions\
\\\", \\(\\({}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\
\\(\\(\\\"x\\\" \[Rule] 0.25`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Pyref\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\
\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] 0.5`\\)\\), \\(\\(\\\"y\\\
\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \
\\(\\(\\\"name\\\" \[Rule] \\\"Py\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\
\\(\\(\\\"x\\\" \[Rule] 0.75`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Pdy\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.5\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Pu\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.568234834211314*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.5682348342123137`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.25`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.25`\\)\[NoBreak] is not a valid value for \
an attribute in an XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.5682348342123137`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.568234834213314*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.5`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"x\
\\\" \[Rule] 0.5`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.5682348342143145`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.568234834215314*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.568234834215314*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.75`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.75`\\)\[NoBreak] is not a valid value for \
an attribute in an XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.5682348342203145`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538977626224161*^9, 3.538982404788947*^9, 
  3.5389866676143494`*^9, 3.554715726239894*^9, 3.568233870743207*^9, 
  3.568234834227315*^9}],

Cell[BoxData["\<\"SignalPID.xml\"\>"], "Output",
 CellChangeTimes->{3.538977626286661*^9, 3.5389824048358216`*^9, 
  3.5389866678018484`*^9, 3.5547157262555156`*^9, 3.5682338707512074`*^9, 
  3.5682348342283154`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Mission Controller", "Subtitle",
 PageWidth->WindowWidth,
 CellChangeTimes->{{3.4464606636627417`*^9, 3.4464606852542763`*^9}, {
   3.4464607234102488`*^9, 3.4464607249246225`*^9}, 3.446741120140625*^9, {
   3.447510244140625*^9, 3.447510251796875*^9}, 3.4475750579871836`*^9, 
   3.540100342846898*^9}],

Cell["\<\
The global input variables are those variables that are inputs to the \
component but  are not passed thrrough the nodes.\
\>", "Text",
 PageWidth->WindowWidth],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Signal\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<WaypointController\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Waypoint Controller with way points\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFile", "[", 
   RowBox[{"domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.520880152296875*^9, 3.520880230078125*^9}, 
   3.520932125875*^9, 3.520932753984375*^9, {3.52093324790625*^9, 
   3.520933251453125*^9}, {3.521775289609375*^9, 3.521775289921875*^9}, {
   3.52249560790625*^9, 3.522495611953125*^9}, {3.5353435506144285`*^9, 
   3.5353435625103617`*^9}, {3.538982066538947*^9, 3.5389820811170716`*^9}, {
   3.538982378538947*^9, 3.538982399913947*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "s1", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<state 1\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "s2", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<state 2\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "s3", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<state 3\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "s4", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<state 4\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "s5", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<state 5\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "s6", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<state 6\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "s7", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<state 7\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "s8", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<state 8\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "s9", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<state 9\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "s10", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<state 10\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xc", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<x-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "yc", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<y-position\>\""}], "}"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.446223460296875*^9, 3.44622356096875*^9}, {
   3.4462236030625*^9, 3.446223670484375*^9}, {3.446223703640625*^9, 
   3.4462238429375*^9}, {3.4462265591875*^9, 3.44622670078125*^9}, {
   3.4463566622546744`*^9, 3.4463566920669837`*^9}, 3.4463567240041475`*^9, {
   3.446357070530962*^9, 3.446357073718421*^9}, 3.446379656956832*^9, {
   3.4464008796202064`*^9, 3.44640090863546*^9}, {3.446452519793661*^9, 
   3.446452619136775*^9}, {3.446460814522464*^9, 3.446460921949324*^9}, {
   3.446460972761937*^9, 3.4464609779947715`*^9}, {3.446461042663227*^9, 
   3.4464610541442213`*^9}, {3.446522488390625*^9, 3.446522516109375*^9}, {
   3.446522610078125*^9, 3.446522622265625*^9}, {3.44652284971875*^9, 
   3.446522850484375*^9}, 3.446524524569768*^9, {3.44657946146875*^9, 
   3.44657946196875*^9}, {3.446637579390625*^9, 3.446637622890625*^9}, {
   3.44663767678125*^9, 3.446637762140625*^9}, {3.446741331921875*^9, 
   3.446741411921875*^9}, {3.4467425738125*^9, 3.446742751625*^9}, {
   3.44674492665625*^9, 3.446744933046875*^9}, 3.446747299859375*^9, {
   3.446834626125*^9, 3.446834892703125*^9}, {3.446834927984375*^9, 
   3.4468349860625*^9}, 3.446835489578125*^9, {3.447510352625*^9, 
   3.447510472859375*^9}, {3.44751067409375*^9, 3.447510704984375*^9}, {
   3.447510735484375*^9, 3.447510761828125*^9}, {3.447510805046875*^9, 
   3.447510816484375*^9}, 3.44751085640625*^9, 3.447603182109375*^9, {
   3.538980896351447*^9, 3.538980896882697*^9}, {3.538981183570197*^9, 
   3.5389812494920716`*^9}, {3.5389822003045716`*^9, 
   3.5389822028670716`*^9}, {3.538986645364492*^9, 3.5389866618487616`*^9}, {
   3.5389891590002813`*^9, 3.5389891657659063`*^9}, {3.5389892010002813`*^9, 
   3.5389892017346563`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "R", ",", "6367500.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Earth radius\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xcWp0", ",", "15.63", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<1st waypoint x-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ycWp0", ",", "57.41", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<1st waypoint y-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alt1", ",", "0", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<altitude 1\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "v1", ",", "200", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<ref. velocity 1\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xcWp1", ",", "15.1669", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<1st waypoint x-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ycWp1", ",", "58.3812", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<1st waypoint y-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alt2", ",", "1000", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<altitude 2\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "v2", ",", "200", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<ref. velocity 2\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xcWp2", ",", "16.8844", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<2st waypoint x-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ycWp2", ",", "58.0408", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<2st waypoint y-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alt3", ",", "200", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<altitude 3\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "v3", ",", "200", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<ref. velocity 3\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xcWp3", ",", "21.5", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<3rd waypoint x-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ycWp3", ",", "58.", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<3rd waypoint y-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alt4", ",", "200", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<altitude 4\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "v4", ",", "200", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<ref. velocity 4\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xcWp4", ",", "22.5", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<4th waypoint x-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ycWp4", ",", "58", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<4th waypoint y-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alt5", ",", "200", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<altitude 5\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "v5", ",", "200", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<ref. velocity 5\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xcWp5", ",", "22.5", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<5th waypoint x-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ycWp5", ",", "59.3", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<5th waypoint y-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alt6", ",", "1000", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<altitude 6\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "v6", ",", "200", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<ref. velocity 6\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xcWp6", ",", "20.7", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<6th waypoint x-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ycWp6", ",", "59.6", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<6th waypoint y-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alt7", ",", "1000", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<altitude 7\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "v7", ",", "200", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<ref. velocity 7\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xcWp7", ",", "18.4", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<7th waypoint x-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ycWp7", ",", "58.5", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<7th waypoint y-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alt8", ",", "1000", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<altitude 8\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "v8", ",", "150", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<ref. velocity 8\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xcWp8", ",", "15.62540", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<8th waypoint x-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ycWp8", ",", "58.473", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<8th waypoint y-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alt9", ",", "0", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<altitude 9\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "v9", ",", "0", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<ref. velocity 9\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xcWp9", ",", "15.6254", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<9th waypoint x-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ycWp9", ",", "58.4228", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<9th waypoint y-position\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.447510830078125*^9, 3.44751083565625*^9}, {
   3.4475108769375*^9, 3.447510899515625*^9}, {3.447602234390625*^9, 
   3.44760241884375*^9}, {3.5389808973358216`*^9, 3.5389809088045716`*^9}, {
   3.540299841336206*^9, 3.5402998947105227`*^9}, {3.54030034670111*^9, 
   3.540300353247817*^9}, {3.5403003964185867`*^9, 3.5403003976216807`*^9}, {
   3.5403004813382874`*^9, 3.5403004814632845`*^9}, {3.540300521993497*^9, 
   3.5403005797420187`*^9}, {3.5403006240065107`*^9, 
   3.5403007770089912`*^9}, {3.5403008357136188`*^9, 3.540300860057992*^9}, 
   3.5403010668564873`*^9, {3.5405282925839195`*^9, 3.5405282933651495`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "set1", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<set state\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "set2", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<set state\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "set3", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<set state\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "set4", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<set state\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "set5", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<set state\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "set6", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<set state\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "set7", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<set state\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "set8", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<set state\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "set9", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<set state\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "altitudeRef", ",", "1000.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<reference altitude\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "headingRef", ",", "1000.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<reference heading\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "velocityRef", ",", "1000.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<reference velocity\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.446223415796875*^9, 3.44622341625*^9}, {
   3.446226723234375*^9, 3.446226798453125*^9}, {3.446522549734375*^9, 
   3.4465225531875*^9}, {3.44652258853125*^9, 3.44652273034375*^9}, 
   3.44652281059375*^9, {3.446621606296875*^9, 3.446621667125*^9}, {
   3.446621712171875*^9, 3.446621755359375*^9}, 3.446621793125*^9, {
   3.44674142409375*^9, 3.44674143390625*^9}, 3.446747302765625*^9, {
   3.446834900828125*^9, 3.44683492328125*^9}, {3.447510302828125*^9, 
   3.447510331328125*^9}, {3.4475981338125*^9, 3.447598192421875*^9}, {
   3.538980909382697*^9, 3.538980914038947*^9}, {3.5389812739608216`*^9, 
   3.538981316663947*^9}, {3.538982180538947*^9, 3.538982188507697*^9}, 
   3.538986625723993*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"d2r", "=", 
  FractionBox[
   RowBox[{"N", "[", 
    RowBox[{"Pi", ",", "6"}], "]"}], "180"]}]], "Input",
 CellChangeTimes->{{3.5402959560398293`*^9, 3.5402959714868135`*^9}}],

Cell[BoxData["0.01745329251994329576923690768488613444`6."], "Output",
 CellChangeTimes->{3.540296042342821*^9, 3.5402960830709543`*^9, 
  3.5405265236283913`*^9, 3.5405283355828185`*^9, 3.54053090268988*^9, 
  3.540534765502161*^9, 3.5405442676051855`*^9, 3.540557883511408*^9, 
  3.5547157263180013`*^9, 3.5682338708612137`*^9, 3.5682348344673285`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"r2d", "=", 
  FractionBox["180", 
   RowBox[{"N", "[", 
    RowBox[{"Pi", ",", "6"}], "]"}]]}]], "Input",
 CellChangeTimes->{{3.540296022924648*^9, 3.5402960391064587`*^9}}],

Cell[BoxData["57.2957795130823208767981548141051463364`6."], "Output",
 CellChangeTimes->{3.5402960447192802`*^9, 3.5402960831022234`*^9, 
  3.540526523784624*^9, 3.540528335598443*^9, 3.540530902705505*^9, 
  3.540534765533412*^9, 3.5405442676208105`*^9, 3.540557883839528*^9, 
  3.554715726349244*^9, 3.5682338708982153`*^9, 3.5682348345013304`*^9}]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{"xWp10", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     RowBox[{
      SuperscriptBox[
       RowBox[{"(", 
        RowBox[{"xcWp1", "-", "xcWp0"}], ")"}], "2"], 
      SuperscriptBox["R", "2"]}], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"ycWp1", "-", "ycWp0"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"position1", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xc", "-", "xcWp0"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"yc", "-", "ycWp0"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"head0", "=", 
    RowBox[{"Atan2L", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"ycWp1", "-", "yc"}], ")"}], "R"}], ",", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"xcWp1", "-", "xc"}], ")"}], "R", " ", 
       RowBox[{"Cos", "[", 
        RowBox[{"d2r", " ", "yc"}], "]"}]}]}], "]"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"xWp21", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xcWp2", "-", "xcWp1"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"ycWp2", "-", "ycWp1"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"position2", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xc", "-", "xcWp1"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"yc", "-", "ycWp1"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"head1", "=", 
    RowBox[{"Atan2L", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"ycWp2", "-", "yc"}], ")"}], "R"}], ",", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"xcWp2", "-", "xc"}], ")"}], "R", " ", 
       RowBox[{"Cos", "[", 
        RowBox[{"d2r", " ", "yc"}], "]"}]}]}], "]"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"xWp32", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xcWp3", "-", "xcWp2"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"ycWp3", "-", "ycWp2"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"position3", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xc", "-", "xcWp2"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"yc", "-", "ycWp2"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"head2", "=", 
    RowBox[{"Atan2L", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"ycWp3", "-", "yc"}], ")"}], "R"}], ",", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"xcWp3", "-", "xc"}], ")"}], "R", " ", 
       RowBox[{"Cos", "[", 
        RowBox[{"d2r", " ", "yc"}], "]"}]}]}], "]"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"xWp43", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xcWp4", "-", "xcWp3"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"ycWp4", "-", "ycWp3"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"position4", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xc", "-", "xcWp3"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"yc", "-", "ycWp3"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"head3", "=", 
    RowBox[{"Atan2L", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"ycWp4", "-", "yc"}], ")"}], "R"}], ",", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"xcWp4", "-", "xc"}], ")"}], "R", " ", 
       RowBox[{"Cos", "[", 
        RowBox[{"d2r", " ", "yc"}], "]"}]}]}], "]"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"xWp54", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xcWp5", "-", "xcWp4"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"ycWp5", "-", "ycWp4"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"position5", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xc", "-", "xcWp4"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"yc", "-", "ycWp4"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"head4", "=", 
    RowBox[{"Atan2L", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"ycWp5", "-", "yc"}], ")"}], "R"}], ",", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"xcWp5", "-", "xc"}], ")"}], "R", " ", 
       RowBox[{"Cos", "[", 
        RowBox[{"d2r", " ", "yc"}], "]"}]}]}], "]"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"xWp65", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xcWp6", "-", "xcWp5"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"ycWp6", "-", "ycWp5"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"position6", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xc", "-", "xcWp5"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"yc", "-", "ycWp5"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"head5", "=", 
    RowBox[{"Atan2L", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"ycWp6", "-", "yc"}], ")"}], "R"}], ",", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"xcWp6", "-", "xc"}], ")"}], "R", " ", 
       RowBox[{"Cos", "[", 
        RowBox[{"d2r", " ", "yc"}], "]"}]}]}], "]"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"xWp76", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xcWp7", "-", "xcWp6"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"ycWp7", "-", "ycWp6"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"position7", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xc", "-", "xcWp6"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"yc", "-", "ycWp6"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"head6", "=", 
    RowBox[{"Atan2L", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"ycWp7", "-", "yc"}], ")"}], "R"}], ",", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"xcWp7", "-", "xc"}], ")"}], "R", " ", 
       RowBox[{"Cos", "[", 
        RowBox[{"d2r", " ", "yc"}], "]"}]}]}], "]"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"xWp87", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xcWp8", "-", "xcWp7"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"ycWp8", "-", "ycWp7"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"position8", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xc", "-", "xcWp7"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"yc", "-", "ycWp7"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"head7", "=", 
    RowBox[{"Atan2L", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"ycWp8", "-", "yc"}], ")"}], "R"}], ",", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"xcWp8", "-", "xc"}], ")"}], "R", " ", 
       RowBox[{"Cos", "[", 
        RowBox[{"d2r", " ", "yc"}], "]"}]}]}], "]"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"xWp98", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xcWp9", "-", "xcWp8"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"ycWp9", "-", "ycWp8"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"position9", "=", 
   RowBox[{"Sqrt", "[", 
    RowBox[{
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"xc", "-", "xcWp8"}], ")"}], "2"], "+", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"yc", "-", "ycWp8"}], ")"}], "2"]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"head8", "=", 
   RowBox[{"Atan2L", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"(", 
       RowBox[{"ycWp9", "-", "yc"}], ")"}], "R"}], ",", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"xcWp9", "-", "xc"}], ")"}], "R", " ", 
      RowBox[{"Cos", "[", 
       RowBox[{"d2r", " ", "yc"}], "]"}]}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"head9", "=", 
   RowBox[{"Atan2L", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"(", 
       RowBox[{"ycWp9", "-", "ycWp8"}], ")"}], "R"}], ",", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"xcWp9", "-", "xcWp8"}], ")"}], "R", " ", 
      RowBox[{"Cos", "[", 
       RowBox[{"d2r", " ", "yc"}], "]"}]}]}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.446452638339777*^9, 3.4464527818076086`*^9}, 
   3.446452850459015*^9, {3.4464631607090783`*^9, 3.4464631828497033`*^9}, {
   3.4464634087559533`*^9, 3.4464634630059533`*^9}, 3.4464635408809533`*^9, {
   3.4464635848497033`*^9, 3.4464635915684533`*^9}, {3.4464636283809533`*^9, 
   3.4464636733028283`*^9}, {3.4464637086622033`*^9, 
   3.4464637303184533`*^9}, {3.446525470644552*^9, 3.446525515206767*^9}, {
   3.446622352859375*^9, 3.446622357625*^9}, {3.44666587075*^9, 
   3.446665888046875*^9}, {3.446666884390625*^9, 3.446666921765625*^9}, 
   3.446666958625*^9, {3.446667170421875*^9, 3.446667191203125*^9}, {
   3.446668162671875*^9, 3.446668165578125*^9}, {3.446668874546875*^9, 
   3.446668879*^9}, {3.446704056*^9, 3.446704195796875*^9}, 
   3.44670435046875*^9, {3.44670455921875*^9, 3.44670461946875*^9}, 
   3.446705553984375*^9, {3.446707892875*^9, 3.446707900703125*^9}, {
   3.4467083515*^9, 3.4467083814375*^9}, {3.446741457359375*^9, 
   3.446741576421875*^9}, {3.446741610890625*^9, 3.44674168228125*^9}, {
   3.4467417159375*^9, 3.44674171771875*^9}, {3.44674175265625*^9, 
   3.446742042609375*^9}, {3.446742414859375*^9, 3.44674242353125*^9}, {
   3.4468350029375*^9, 3.446835136421875*^9}, 3.447343461625*^9, {
   3.44750555559375*^9, 3.447505567140625*^9}, {3.447509747015625*^9, 
   3.447509802265625*^9}, {3.447518087296875*^9, 3.447518089640625*^9}, 
   3.44752085290625*^9, {3.44752238603125*^9, 3.447522408546875*^9}, {
   3.5389857278341665`*^9, 3.5389857349747915`*^9}, 3.5389865747711935`*^9, {
   3.538988947876569*^9, 3.5389889557358932`*^9}, {3.538989098141232*^9, 
   3.538989122094204*^9}, {3.5402999305068293`*^9, 3.540299995255586*^9}, 
   3.5403002257667055`*^9, {3.5403014115241156`*^9, 3.540301420180199*^9}, {
   3.5403017179731913`*^9, 3.5403017347236204`*^9}, 3.5403019165564003`*^9, {
   3.5405280084661927`*^9, 3.540528053215047*^9}, {3.5405281010419474`*^9, 
   3.540528219960778*^9}, {3.540530815627713*^9, 3.540530830502842*^9}, {
   3.5405343648939686`*^9, 3.540534402205991*^9}, {3.540544214744796*^9, 
   3.5405442454641356`*^9}, {3.540559001559596*^9, 3.540559006840779*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"expressions", "=", 
  RowBox[{"{", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"set1", ",", 
      RowBox[{"onPositive", "[", 
       RowBox[{"(", 
        RowBox[{"position1", "-", "xWp10"}], ")"}], "]"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"set2", ",", 
      RowBox[{"onPositive", "[", 
       RowBox[{"(", 
        RowBox[{"position2", "-", "xWp21"}], ")"}], "]"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"set3", ",", 
      RowBox[{"onPositive", "[", 
       RowBox[{"(", 
        RowBox[{"position3", "-", "xWp32"}], ")"}], "]"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"set4", ",", 
      RowBox[{"onPositive", "[", 
       RowBox[{"(", 
        RowBox[{"position4", "-", "xWp43"}], ")"}], "]"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"set5", ",", 
      RowBox[{"onPositive", "[", 
       RowBox[{"(", 
        RowBox[{"position5", "-", "xWp54"}], ")"}], "]"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"set6", ",", 
      RowBox[{"onPositive", "[", 
       RowBox[{"(", 
        RowBox[{"position6", "-", "xWp65"}], ")"}], "]"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"set7", ",", 
      RowBox[{"onPositive", "[", 
       RowBox[{"(", 
        RowBox[{"position7", "-", "xWp76"}], ")"}], "]"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"set8", ",", 
      RowBox[{"onPositive", "[", 
       RowBox[{"(", 
        RowBox[{"position8", "-", "xWp87"}], ")"}], "]"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"set9", ",", 
      RowBox[{"onPositive", "[", 
       RowBox[{"(", 
        RowBox[{"position9", "-", "xWp98"}], ")"}], "]"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"set10", ",", "0."}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"altitudeRef", ",", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"s1", " ", "alt1"}], "+", 
        RowBox[{"s2", " ", "alt2"}], "+", 
        RowBox[{"s3", " ", "alt3"}], "+", 
        RowBox[{"s4", " ", "alt4"}], "+", 
        RowBox[{"s5", " ", "alt5"}], "+", 
        RowBox[{"s6", " ", "alt6"}], "+", 
        RowBox[{"s7", " ", "alt7"}], "+", 
        RowBox[{"s8", " ", "alt8"}], "+", 
        RowBox[{"s9", " ", "alt9"}]}], ")"}]}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"headingRef", ",", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"s1", " ", "head1"}], "+", 
        RowBox[{"s2", " ", "head2"}], "+", 
        RowBox[{"s3", " ", "head3"}], "+", 
        RowBox[{"s4", " ", "head4"}], "+", 
        RowBox[{"s5", " ", "head5"}], "+", 
        RowBox[{"s6", " ", "head6"}], "+", 
        RowBox[{"s7", " ", "head7"}], "+", 
        RowBox[{"s8", " ", "head8"}], "+", 
        RowBox[{"s9", " ", "head9"}]}], ")"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"velocityRef", ",", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"s1", " ", "v1"}], "+", 
        RowBox[{"s2", " ", "v2"}], "+", 
        RowBox[{"s3", " ", "v3"}], "+", 
        RowBox[{"s4", " ", "v4"}], "+", 
        RowBox[{"s5", " ", "v5"}], "+", 
        RowBox[{"s6", " ", "v6"}], "+", 
        RowBox[{"s7", " ", "v7"}], "+", 
        RowBox[{"s8", " ", "v8"}], "+", 
        RowBox[{"s9", " ", "v9"}]}], ")"}]}], "}"}]}], "\[IndentingNewLine]", 
   "}"}]}]], "Input",
 CellChangeTimes->{{3.538980959601447*^9, 3.5389811518983216`*^9}, {
   3.538981699351447*^9, 3.538981711913947*^9}, {3.538982108538947*^9, 
   3.5389821468670716`*^9}, {3.538982445195197*^9, 3.5389824714920716`*^9}, 
   3.5389857465685415`*^9, 3.5389858448810415`*^9, {3.5389858878654165`*^9, 
   3.5389858906466665`*^9}, 3.5389859873185415`*^9, {3.5389861225372915`*^9, 
   3.5389861413029165`*^9}, {3.5389864473341665`*^9, 
   3.5389864935841665`*^9}, {3.538986543552644*^9, 3.5389865651618805`*^9}, {
   3.5389867534888*^9, 3.538986756879403*^9}, {3.5389888536740465`*^9, 
   3.5389888572521486`*^9}, {3.5389890403759766`*^9, 
   3.5389890852038145`*^9}, {3.5389891392190943`*^9, 3.538989145109681*^9}, {
   3.539191613515625*^9, 3.5391916643125*^9}, {3.539193119875*^9, 
   3.53919318265625*^9}, {3.5403002522504025`*^9, 3.540300284733946*^9}, 
   3.5405308840962486`*^9, {3.540557801449958*^9, 3.5405578394650965`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"set1", ",", 
     RowBox[{"onPositive", "[", 
      RowBox[{
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"xc", "-", "xcWp0"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"yc", "-", "ycWp0"}], ")"}], "2"]}]], "-", 
       SqrtBox[
        RowBox[{
         RowBox[{
          SuperscriptBox["R", "2"], " ", 
          SuperscriptBox[
           RowBox[{"(", 
            RowBox[{
             RowBox[{"-", "xcWp0"}], "+", "xcWp1"}], ")"}], "2"]}], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "ycWp0"}], "+", "ycWp1"}], ")"}], "2"]}]]}], "]"}]}],
     "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"set2", ",", 
     RowBox[{"onPositive", "[", 
      RowBox[{
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"xc", "-", "xcWp1"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"yc", "-", "ycWp1"}], ")"}], "2"]}]], "-", 
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xcWp1"}], "+", "xcWp2"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "ycWp1"}], "+", "ycWp2"}], ")"}], "2"]}]]}], "]"}]}],
     "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"set3", ",", 
     RowBox[{"onPositive", "[", 
      RowBox[{
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"xc", "-", "xcWp2"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"yc", "-", "ycWp2"}], ")"}], "2"]}]], "-", 
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xcWp2"}], "+", "xcWp3"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "ycWp2"}], "+", "ycWp3"}], ")"}], "2"]}]]}], "]"}]}],
     "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"set4", ",", 
     RowBox[{"onPositive", "[", 
      RowBox[{
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"xc", "-", "xcWp3"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"yc", "-", "ycWp3"}], ")"}], "2"]}]], "-", 
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xcWp3"}], "+", "xcWp4"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "ycWp3"}], "+", "ycWp4"}], ")"}], "2"]}]]}], "]"}]}],
     "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"set5", ",", 
     RowBox[{"onPositive", "[", 
      RowBox[{
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"xc", "-", "xcWp4"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"yc", "-", "ycWp4"}], ")"}], "2"]}]], "-", 
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xcWp4"}], "+", "xcWp5"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "ycWp4"}], "+", "ycWp5"}], ")"}], "2"]}]]}], "]"}]}],
     "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"set6", ",", 
     RowBox[{"onPositive", "[", 
      RowBox[{
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"xc", "-", "xcWp5"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"yc", "-", "ycWp5"}], ")"}], "2"]}]], "-", 
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xcWp5"}], "+", "xcWp6"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "ycWp5"}], "+", "ycWp6"}], ")"}], "2"]}]]}], "]"}]}],
     "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"set7", ",", 
     RowBox[{"onPositive", "[", 
      RowBox[{
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"xc", "-", "xcWp6"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"yc", "-", "ycWp6"}], ")"}], "2"]}]], "-", 
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xcWp6"}], "+", "xcWp7"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "ycWp6"}], "+", "ycWp7"}], ")"}], "2"]}]]}], "]"}]}],
     "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"set8", ",", 
     RowBox[{"onPositive", "[", 
      RowBox[{
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"xc", "-", "xcWp7"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"yc", "-", "ycWp7"}], ")"}], "2"]}]], "-", 
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xcWp7"}], "+", "xcWp8"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "ycWp7"}], "+", "ycWp8"}], ")"}], "2"]}]]}], "]"}]}],
     "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"set9", ",", 
     RowBox[{"onPositive", "[", 
      RowBox[{
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"xc", "-", "xcWp8"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"yc", "-", "ycWp8"}], ")"}], "2"]}]], "-", 
       SqrtBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xcWp8"}], "+", "xcWp9"}], ")"}], "2"], "+", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "ycWp8"}], "+", "ycWp9"}], ")"}], "2"]}]]}], "]"}]}],
     "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"set10", ",", "0.`"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"altitudeRef", ",", 
     RowBox[{
      RowBox[{"alt1", " ", "s1"}], "+", 
      RowBox[{"alt2", " ", "s2"}], "+", 
      RowBox[{"alt3", " ", "s3"}], "+", 
      RowBox[{"alt4", " ", "s4"}], "+", 
      RowBox[{"alt5", " ", "s5"}], "+", 
      RowBox[{"alt6", " ", "s6"}], "+", 
      RowBox[{"alt7", " ", "s7"}], "+", 
      RowBox[{"alt8", " ", "s8"}], "+", 
      RowBox[{"alt9", " ", "s9"}]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"headingRef", ",", 
     RowBox[{
      RowBox[{"s1", " ", 
       RowBox[{"Atan2L", "[", 
        RowBox[{
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "yc"}], "+", "ycWp2"}], ")"}]}], ",", 
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xc"}], "+", "xcWp2"}], ")"}], " ", 
          RowBox[{"Cos", "[", 
           RowBox[{"0.01745329251994329576923690768488613444`6.", " ", "yc"}],
            "]"}]}]}], "]"}]}], "+", 
      RowBox[{"s2", " ", 
       RowBox[{"Atan2L", "[", 
        RowBox[{
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "yc"}], "+", "ycWp3"}], ")"}]}], ",", 
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xc"}], "+", "xcWp3"}], ")"}], " ", 
          RowBox[{"Cos", "[", 
           RowBox[{"0.01745329251994329576923690768488613444`6.", " ", "yc"}],
            "]"}]}]}], "]"}]}], "+", 
      RowBox[{"s3", " ", 
       RowBox[{"Atan2L", "[", 
        RowBox[{
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "yc"}], "+", "ycWp4"}], ")"}]}], ",", 
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xc"}], "+", "xcWp4"}], ")"}], " ", 
          RowBox[{"Cos", "[", 
           RowBox[{"0.01745329251994329576923690768488613444`6.", " ", "yc"}],
            "]"}]}]}], "]"}]}], "+", 
      RowBox[{"s4", " ", 
       RowBox[{"Atan2L", "[", 
        RowBox[{
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "yc"}], "+", "ycWp5"}], ")"}]}], ",", 
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xc"}], "+", "xcWp5"}], ")"}], " ", 
          RowBox[{"Cos", "[", 
           RowBox[{"0.01745329251994329576923690768488613444`6.", " ", "yc"}],
            "]"}]}]}], "]"}]}], "+", 
      RowBox[{"s5", " ", 
       RowBox[{"Atan2L", "[", 
        RowBox[{
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "yc"}], "+", "ycWp6"}], ")"}]}], ",", 
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xc"}], "+", "xcWp6"}], ")"}], " ", 
          RowBox[{"Cos", "[", 
           RowBox[{"0.01745329251994329576923690768488613444`6.", " ", "yc"}],
            "]"}]}]}], "]"}]}], "+", 
      RowBox[{"s6", " ", 
       RowBox[{"Atan2L", "[", 
        RowBox[{
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "yc"}], "+", "ycWp7"}], ")"}]}], ",", 
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xc"}], "+", "xcWp7"}], ")"}], " ", 
          RowBox[{"Cos", "[", 
           RowBox[{"0.01745329251994329576923690768488613444`6.", " ", "yc"}],
            "]"}]}]}], "]"}]}], "+", 
      RowBox[{"s7", " ", 
       RowBox[{"Atan2L", "[", 
        RowBox[{
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "yc"}], "+", "ycWp8"}], ")"}]}], ",", 
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xc"}], "+", "xcWp8"}], ")"}], " ", 
          RowBox[{"Cos", "[", 
           RowBox[{"0.01745329251994329576923690768488613444`6.", " ", "yc"}],
            "]"}]}]}], "]"}]}], "+", 
      RowBox[{"s8", " ", 
       RowBox[{"Atan2L", "[", 
        RowBox[{
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "yc"}], "+", "ycWp9"}], ")"}]}], ",", 
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xc"}], "+", "xcWp9"}], ")"}], " ", 
          RowBox[{"Cos", "[", 
           RowBox[{"0.01745329251994329576923690768488613444`6.", " ", "yc"}],
            "]"}]}]}], "]"}]}], "+", 
      RowBox[{"s9", " ", 
       RowBox[{"Atan2L", "[", 
        RowBox[{
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "ycWp8"}], "+", "ycWp9"}], ")"}]}], ",", 
         RowBox[{"R", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "xcWp8"}], "+", "xcWp9"}], ")"}], " ", 
          RowBox[{"Cos", "[", 
           RowBox[{"0.01745329251994329576923690768488613444`6.", " ", "yc"}],
            "]"}]}]}], "]"}]}]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"velocityRef", ",", 
     RowBox[{
      RowBox[{"s1", " ", "v1"}], "+", 
      RowBox[{"s2", " ", "v2"}], "+", 
      RowBox[{"s3", " ", "v3"}], "+", 
      RowBox[{"s4", " ", "v4"}], "+", 
      RowBox[{"s5", " ", "v5"}], "+", 
      RowBox[{"s6", " ", "v6"}], "+", 
      RowBox[{"s7", " ", "v7"}], "+", 
      RowBox[{"s8", " ", "v8"}], "+", 
      RowBox[{"s9", " ", "v9"}]}]}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.538982363882697*^9, 3.5389824049295716`*^9, {3.538982455132697*^9, 
   3.5389824771170716`*^9}, {3.5389866682080956`*^9, 3.5389866906610775`*^9}, 
   3.5389867975666428`*^9, 3.538988282972872*^9, 3.5389892197815313`*^9, 
   3.539191692515625*^9, 3.5401003569251137`*^9, 3.540300331873364*^9, 
   3.5403004041527634`*^9, 3.5403008841367335`*^9, 3.540301072981448*^9, 
   3.540301930103622*^9, 3.5405283357546887`*^9, 3.5405309029398785`*^9, 
   3.540534765752166*^9, 3.5405442678083143`*^9, 3.540557884714517*^9, 
   3.55471572641173*^9, 3.5682338709652195`*^9, 3.5682348345473332`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"SignalWaypointController\\\"\\)\\), \
\\(\\(\\\"displayname\\\" \[Rule] \\(\\(\\\"Sig\\\" \[Ellipsis] \
\\\"ller\\\"\\)\\)\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \
\\(\\({\\(\\(\\\"isopath\\\" \[Rule] \
\\\"SignalWaypointController.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"SignalWaypointController.svg\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \
\\(\\({}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\
\\\"x\\\" \[Rule] 0.07692307692307693`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\
\"\\)\\), \\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \
\[Rule] \\\"Ps1\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\
\[LeftSkeleton] 22 \[RightSkeleton]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.923077\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"PvelocityRef\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \\(\\({\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\(\\(\\\"Sign\\\" \[Ellipsis] \\\"ller\\\"\\)\\)\\)\\), \\(\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"SignalWaypointController.svg\\\"\\)\\), \
\\(\\(\\\"iconrotation\\\" \[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \
\[Rule] \\\"SignalWaypointController.svg\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \
\\(\\({}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\
\\\"x\\\" \[Rule] 0.07692307692307693`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\
\"\\)\\), \\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \
\[Rule] \\\"Ps1\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\
\[LeftSkeleton] 22 \[RightSkeleton]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.923077\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"PvelocityRef\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.5547157265679436`*^9, 3.5682338710712256`*^9, 3.568234834652339*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.5547157265679436`*^9, 3.5682338710712256`*^9, 3.5682348346543393`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.07692307692307693`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.07692307692307693`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.5547157265679436`*^9, 3.5682338710712256`*^9, 3.5682348346543393`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.5547157265679436`*^9, 3.5682338710712256`*^9, 3.5682348346563396`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.15384615384615385`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.15384615384615385`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.5547157265679436`*^9, 3.5682338710712256`*^9, 3.5682348346573396`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.5547157265679436`*^9, 3.5682338710712256`*^9, 3.5682348346583395`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.5547157265679436`*^9, 3.5682338710712256`*^9, 3.5682348346583395`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.23076923076923078`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.23076923076923078`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.5547157265679436`*^9, 3.5682338710712256`*^9, 3.56823483465934*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.5547157265679436`*^9, 3.5682338710712256`*^9, 3.56823483465934*^9}],

Cell[BoxData["\<\"SignalWaypointController.xml\"\>"], "Output",
 CellChangeTimes->{
  3.538982365163947*^9, 3.538982405070197*^9, {3.5389824552733216`*^9, 
   3.5389824772420716`*^9}, {3.5389866683643446`*^9, 3.5389866908017015`*^9}, 
   3.538986797722892*^9, 3.5389882831134963`*^9, 3.5389892199065313`*^9, 
   3.5391916979375*^9, 3.5401003651907916`*^9, 3.540300333170206*^9, 
   3.540300404402757*^9, 3.5403008843242383`*^9, 3.540301073184572*^9, 
   3.54030193041613*^9, 3.540528336239052*^9, 3.540530903564874*^9, 
   3.540534766158424*^9, 3.5405442683708253`*^9, 3.5405578901675725`*^9, 
   3.5547157265835648`*^9, 3.5682338710772257`*^9, 3.5682348346743402`*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Time Accelerator",
 FontFamily->"System"]], "Subtitle",
 Evaluatable->False],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Signal\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<TimeAccelerator\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Accelerate time in mission simulation\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFile", "[", 
   RowBox[{"domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.520880152296875*^9, 3.520880230078125*^9}, 
   3.520932125875*^9, 3.520932753984375*^9, {3.52093324790625*^9, 
   3.520933251453125*^9}, {3.521775289609375*^9, 3.521775289921875*^9}, {
   3.52249560790625*^9, 3.522495611953125*^9}, {3.5353435506144285`*^9, 
   3.5353435625103617`*^9}, {3.538982066538947*^9, 3.5389820811170716`*^9}, {
   3.538982378538947*^9, 3.538982399913947*^9}, {3.540036466246253*^9, 
   3.540036514526885*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"Transformi", "=", "1"}], ";"}]], "Input",
 CellChangeTimes->{3.540036531167297*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", "  ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "timeE", ",", "0.", ",", "double", ",", "\"\<sec\>\"", ",", 
       "\"\<effective time\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "massflowE", ",", "0.", ",", "double", ",", "\"\<kg\>\"", ",", 
       "\"\<Effective Mass flow rate\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xcgE", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Effective x-position\>\""}], "}"}], ",", "\t", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ycgE", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Effective y-position\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.540036550854545*^9, 3.5400365799479227`*^9}, {
  3.5400367642120385`*^9, 3.54003677330573*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "  ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "timecomp", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<time compression rate\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "massflow", ",", "0.", ",", "double", ",", "\"\<kg/s\>\"", ",", 
       "\"\<Mass flow rate\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "vxcg", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<x-position\>\""}], "}"}], ",", "\t", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "vycg", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<y-position\>\""}], "}"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.5400365557294827`*^9, 3.540036581854148*^9}, {
   3.540036774774471*^9, 3.5400367835556645`*^9}, 3.540101749732268*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemVariables", " ", "=", " ", 
   RowBox[{"{", 
    RowBox[{"xcgE", ",", "ycgE", ",", "timeE"}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.540036598760182*^9, 3.540036610853777*^9}, 
   3.54010037897213*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemEquationsDa", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{
      RowBox[{"Der", "[", "xcgE", "]"}], "-", 
      RowBox[{"timecomp", "*", "vxcg"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"Der", "[", "ycgE", "]"}], "-", 
      RowBox[{"timecomp", "*", "vycg"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"Der", "[", "timeE", "]"}], "-", "timecomp"}]}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.54003668666566*^9, 3.540036696446847*^9}, {
  3.540101614669768*^9, 3.540101620435393*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"boudaryEquations", " ", "=", " ", 
   RowBox[{"{", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.5400366286347995`*^9, 3.5400366286347995`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", " ", "=", 
   RowBox[{"{", "\n", "\t\t", 
    RowBox[{"{", 
     RowBox[{"massflowE", ",", 
      RowBox[{"timecomp", " ", "massflow"}]}], "}"}], "\n", "\t\t", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{3.5400366560408554`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"variableLimits", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"consfuel", ",", "0", ",", "massfuel0"}], "}"}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.540036718868579*^9, 3.5400367257591596`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"variableLimits", "=", 
   RowBox[{"{", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{3.5400366589627123`*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(1, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.56823483484135*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(2, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.5682348348533506`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(3, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.568234834868352*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Part :: \
partd\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.568234834870352*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"SignalTimeAccelerator\\\"\\)\\), \
\\(\\(\\\"displayname\\\" \[Rule] \\\"SignalTimeAccelerator\\\"\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"SignalTimeAccelerator.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"SignalTimeAccelerator.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] 0.2`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Ptimecomp\\\"\\)\\)}\
\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\[LeftSkeleton] 6 \[RightSkeleton]\
\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] \\\"0.8\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"PycgE\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\(\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\) \[Rule] \\(\\(\\\"\\\" \
\[Ellipsis] \\\"\\\"\\)\\)}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"SignalTimeAccelerator\\\"\\)\\), \\(\\(\\\"displayname\\\" \
\[Rule] \\(\\(\\\"Sign\\\" \[Ellipsis] \\\"ator\\\"\\)\\)\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"SignalTimeAccelerator.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"SignalTimeAccelerator.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] 0.2`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Ptimecomp\\\"\\)\\)}\
\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\[LeftSkeleton] 6 \[RightSkeleton]\
\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] \\\"0.8\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"PycgE\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.5682348348713517`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.5682348348713517`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.2`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"x\
\\\" \[Rule] 0.2`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.5682348348723516`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.5682348348723516`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.4`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"x\
\\\" \[Rule] 0.4`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.568234834873352*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.568234834874352*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.568234834874352*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.6000000000000001`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.6000000000000001`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.568234834875352*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.540100365987672*^9, 3.5401003842846637`*^9}, 
   3.540101639419768*^9, 3.540101764091643*^9, 3.5547157268178864`*^9, 
   3.568233871254236*^9, 3.568234834875352*^9}],

Cell[BoxData["\<\"SignalTimeAccelerator.xml\"\>"], "Output",
 CellChangeTimes->{{3.540100367128304*^9, 3.540100384378414*^9}, 
   3.540101639544768*^9, 3.540101764138518*^9, 3.5547157268335075`*^9, 
   3.5682338712792377`*^9, 3.5682348348763523`*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["EarthCoordinates",
 FontFamily->"System"]], "Subtitle",
 Evaluatable->False,
 CellChangeTimes->{{3.540277706431121*^9, 3.540277714774818*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Signal\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<EarthCoordinates\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Calculates earth coordinates\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFile", "[", 
   RowBox[{"domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.520880152296875*^9, 3.520880230078125*^9}, 
   3.520932125875*^9, 3.520932753984375*^9, {3.52093324790625*^9, 
   3.520933251453125*^9}, {3.521775289609375*^9, 3.521775289921875*^9}, {
   3.52249560790625*^9, 3.522495611953125*^9}, {3.5353435506144285`*^9, 
   3.5353435625103617`*^9}, {3.538982066538947*^9, 3.5389820811170716`*^9}, {
   3.538982378538947*^9, 3.538982399913947*^9}, {3.540036466246253*^9, 
   3.540036514526885*^9}, {3.540277726915365*^9, 3.540277752680825*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"Transformi", "=", "1"}], ";"}]], "Input",
 CellChangeTimes->{3.540036531167297*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", "  ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "timeE", ",", "0.", ",", "double", ",", "\"\<sec\>\"", ",", 
       "\"\<effective time\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "longitude", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Effective x-position\>\""}], "}"}], ",", "\t", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "lattitude", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Effective y-position\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.540036550854545*^9, 3.5400365799479227`*^9}, {
   3.5400367642120385`*^9, 3.54003677330573*^9}, 3.540277764118252*^9, {
   3.540283074925563*^9, 3.540283085175497*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", "  ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
     "R", ",", "6367500.", ",", "double", ",", "\"\<m\>\"", ",", 
      "\"\<Earth radius\>\""}], "}"}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.5402835318601384`*^9, 3.5402835552818637`*^9}, 
   3.540295087578125*^9, {3.5405264760398197`*^9, 3.540526494084731*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "  ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "timecomp", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<time compression rate\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "vxcg", ",", "0.", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<eastward speed\>\""}], "}"}], ",", "\t", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "vycg", ",", "0.", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<northward speed\>\""}], "}"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.5400365557294827`*^9, 3.540036581854148*^9}, {
   3.540036774774471*^9, 3.5400367835556645`*^9}, 3.540101749732268*^9, {
   3.5402777865087337`*^9, 3.5402778445396123`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"d2r", "=", 
  FractionBox[
   RowBox[{"N", "[", 
    RowBox[{"Pi", ",", "6"}], "]"}], "180"]}]], "Input",
 CellChangeTimes->{{3.5402959560398293`*^9, 3.5402959714868135`*^9}}],

Cell[BoxData["0.01745329251994329576923690768488613444`6."], "Output",
 CellChangeTimes->{3.540296042342821*^9, 3.5402960830709543`*^9, 
  3.5405265236283913`*^9, 3.5405314783867087`*^9, 3.5547157277239275`*^9, 
  3.5682338714222455`*^9, 3.5682348350043592`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"r2d", "=", 
  FractionBox["180", 
   RowBox[{"N", "[", 
    RowBox[{"Pi", ",", "6"}], "]"}]]}]], "Input",
 CellChangeTimes->{{3.540296022924648*^9, 3.5402960391064587`*^9}}],

Cell[BoxData["57.2957795130823208767981548141051463364`6."], "Output",
 CellChangeTimes->{3.5402960447192802`*^9, 3.5402960831022234`*^9, 
  3.540526523784624*^9, 3.5405314784023333`*^9, 3.5547157277864127`*^9, 
  3.5682338714502473`*^9, 3.568234835046362*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemVariables", " ", "=", " ", 
   RowBox[{"{", 
    RowBox[{"lattitude", ",", "longitude", ",", "timeE"}], "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.540036598760182*^9, 3.540036610853777*^9}, 
   3.54010037897213*^9, {3.540283613203368*^9, 3.5402836260782857`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemEquationsDa", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{
      RowBox[{"Der", "[", "lattitude", "]"}], "-", 
      RowBox[{"timecomp", "*", "r2d", 
       FractionBox["vycg", "R"]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"Der", "[", "longitude", "]"}], "-", 
      RowBox[{"timecomp", "*", 
       FractionBox[
        RowBox[{"r2d", " ", "vxcg"}], 
        RowBox[{"R", " ", 
         RowBox[{"Cos", "[", 
          RowBox[{"d2r", " ", "lattitude"}], "]"}]}]]}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"Der", "[", "timeE", "]"}], "-", "timecomp"}]}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.54003668666566*^9, 3.540036696446847*^9}, {
   3.540101614669768*^9, 3.540101620435393*^9}, {3.5402834868916764`*^9, 
   3.5402835156258674`*^9}, {3.5402835660942945`*^9, 
   3.5402836421094327`*^9}, {3.5402958822757864`*^9, 3.540295943203822*^9}, {
   3.540295978444211*^9, 3.5402960058516645`*^9}, {3.5402960581806707`*^9, 
   3.540296065716548*^9}, 3.540526178917758*^9, 3.540531467308797*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"boudaryEquations", " ", "=", " ", 
   RowBox[{"{", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.5400366286347995`*^9, 3.5400366286347995`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"variableLimits", "=", 
   RowBox[{"{", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{3.5400366589627123`*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(1, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.5682348351463675`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(2, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.568234835168369*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(3, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.5682348351693687`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Part :: \
partd\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.568234835170369*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"SignalEarthCoordinates\\\"\\)\\), \
\\(\\(\\\"displayname\\\" \[Rule] \
\\\"SignalEarthCoordinates\\\"\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\
\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \[Rule] \
\\\"SignalEarthCoordinates.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \[Rule] \
\\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"SignalEarthCoordinates.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)]\\)\\)}\\)\\)\
\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \\(\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"SignalEarthCoordinates\\\"\\)\\), \\(\\(\\\"displayname\\\" \
\[Rule] \\(\\(\[LeftSkeleton] 24 \[RightSkeleton]\\)\\)\\)\\)}\\)\\), \\(\\({\
\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \[Rule] \
\\\"SignalEarthCoordinates.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \[Rule] \
\\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"SignalEarthCoordinates.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] 0.25`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Ptimecomp\\\"\\)\\)}\
\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\[LeftSkeleton] 4 \[RightSkeleton]\
\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] \\\"0.75\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \\(\\(\\\
\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Plattitude\\\
\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.56823483519237*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.56823483519337*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.25`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.25`\\)\[NoBreak] is not a valid value for \
an attribute in an XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.5682348351943703`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.5682348351943703`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.5`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"x\
\\\" \[Rule] 0.5`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.5682348351953707`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.56823483519637*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.56823483519637*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.75`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.75`\\)\[NoBreak] is not a valid value for \
an attribute in an XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.5682348351983705`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5402950990625*^9, 3.5402960831647615`*^9, 
  3.5405265265499487`*^9, 3.5405314785273314`*^9, 3.554715728036355*^9, 
  3.568233871735264*^9, 3.5682348351993704`*^9}],

Cell[BoxData["\<\"SignalEarthCoordinates.xml\"\>"], "Output",
 CellChangeTimes->{{3.540100367128304*^9, 3.540100384378414*^9}, 
   3.540101639544768*^9, 3.540101764138518*^9, {3.540295091078125*^9, 
   3.540295100953125*^9}, 3.540296083211665*^9, 3.540526528909067*^9, 
   3.540531479074196*^9, 3.5547157281925693`*^9, 3.568233871766265*^9, 
   3.5682348351993704`*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["StateMonitor", "Subtitle",
 PageWidth->WindowWidth,
 CellChangeTimes->{{3.4464606636627417`*^9, 3.4464606852542763`*^9}, {
   3.4464607234102488`*^9, 3.4464607249246225`*^9}, {3.44674110728125*^9, 
   3.446741112*^9}, {3.44674378984375*^9, 3.44674381925*^9}, {
   3.446831826546875*^9, 3.44683182928125*^9}, {3.447608869765625*^9, 
   3.447608886046875*^9}, {3.447938377*^9, 3.44793839784375*^9}, {
   3.457505668421875*^9, 3.457505675765625*^9}, 3.457548937859375*^9, 
   3.540100392644092*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Signal\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<StateMonitor\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Check for steady state\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFile", "[", 
   RowBox[{"domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.520880152296875*^9, 3.520880230078125*^9}, 
   3.520932125875*^9, 3.520932753984375*^9, {3.52093324790625*^9, 
   3.520933251453125*^9}, {3.521775289609375*^9, 3.521775289921875*^9}, {
   3.52249560790625*^9, 3.522495611953125*^9}, {3.5353435506144285`*^9, 
   3.5353435625103617`*^9}, {3.538982066538947*^9, 3.5389820811170716`*^9}, {
   3.538982378538947*^9, 3.538982399913947*^9}, {3.540095811916009*^9, 
   3.5400958134316144`*^9}, {3.5400958446187153`*^9, 3.5400958611341286`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "y1", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<monitored variable 1\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "y2", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<monitored variable 2\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "y3", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<monitored variable 3\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "sOn", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<extra trigg signal\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.446223460296875*^9, 3.44622356096875*^9}, {
   3.4462236030625*^9, 3.446223670484375*^9}, {3.446223703640625*^9, 
   3.4462238429375*^9}, {3.4462265591875*^9, 3.44622670078125*^9}, {
   3.4463566622546744`*^9, 3.4463566920669837`*^9}, 3.4463567240041475`*^9, {
   3.446357070530962*^9, 3.446357073718421*^9}, 3.446379656956832*^9, {
   3.4464008796202064`*^9, 3.44640090863546*^9}, {3.446452519793661*^9, 
   3.446452619136775*^9}, {3.446460814522464*^9, 3.446460921949324*^9}, {
   3.446460972761937*^9, 3.4464609779947715`*^9}, {3.446461042663227*^9, 
   3.4464610541442213`*^9}, {3.446522488390625*^9, 3.446522516109375*^9}, {
   3.446522610078125*^9, 3.446522622265625*^9}, {3.44652284971875*^9, 
   3.446522850484375*^9}, 3.446524524569768*^9, {3.44657946146875*^9, 
   3.44657946196875*^9}, {3.446637579390625*^9, 3.446637622890625*^9}, {
   3.44663767678125*^9, 3.446637762140625*^9}, {3.446741156203125*^9, 
   3.446741194671875*^9}, 3.446744375703125*^9, {3.4468319421875*^9, 
   3.446831994875*^9}, {3.447609315015625*^9, 3.447609356953125*^9}, 
   3.44760944415625*^9, {3.447938433375*^9, 3.44793848459375*^9}, {
   3.447938571546875*^9, 3.4479385744375*^9}, {3.447951560046875*^9, 
   3.44795160009375*^9}, {3.457505934953125*^9, 3.457505949234375*^9}, {
   3.540095890602502*^9, 3.540095891883735*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "y10", ",", "0.02", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<treashold variable 1\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "y20", ",", "0.02", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<treashold variable 2\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "y30", ",", "0.02", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<treashold variable 3\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "thau", ",", "1.", ",", "double", ",", "\"\<sec\>\"", ",", 
       "\"\<filter time constant 2\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.446223415796875*^9, 3.44622341625*^9}, {
   3.446226723234375*^9, 3.446226798453125*^9}, {3.446522549734375*^9, 
   3.4465225531875*^9}, {3.44652258853125*^9, 3.44652273034375*^9}, 
   3.44652281059375*^9, {3.446621606296875*^9, 3.446621667125*^9}, {
   3.446621712171875*^9, 3.446621755359375*^9}, 3.446621793125*^9, {
   3.446741206*^9, 3.4467412113125*^9}, 3.446744380671875*^9, {
   3.4468318606875*^9, 3.446831875703125*^9}, {3.447343772046875*^9, 
   3.44734378671875*^9}, {3.447609447859375*^9, 3.447609485359375*^9}, {
   3.44793849353125*^9, 3.4479386746875*^9}, {3.44794802734375*^9, 
   3.44794807459375*^9}, {3.447948734828125*^9, 3.44794874171875*^9}, {
   3.4480035023598375`*^9, 3.4480035087661285`*^9}, {3.45754899871875*^9, 
   3.457549000296875*^9}, {3.540095892274355*^9, 3.540095893149344*^9}, {
   3.5400959381018934`*^9, 3.5400959624297075`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "s1", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<One when varaibles in steady state\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "y1f", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<filtered variable 1\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "y2f", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<filtered variable 2\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "y3f", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<filtered variable 3\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.446223415796875*^9, 3.44622341625*^9}, {
   3.446226723234375*^9, 3.446226798453125*^9}, {3.446522549734375*^9, 
   3.4465225531875*^9}, {3.44652258853125*^9, 3.44652273034375*^9}, 
   3.44652281059375*^9, {3.446621606296875*^9, 3.446621667125*^9}, {
   3.446621712171875*^9, 3.446621755359375*^9}, 3.446621793125*^9, {
   3.446741206*^9, 3.4467412113125*^9}, 3.446744380671875*^9, {
   3.4468318606875*^9, 3.446831875703125*^9}, {3.447343772046875*^9, 
   3.44734378671875*^9}, {3.447609447859375*^9, 3.447609485359375*^9}, {
   3.44793849353125*^9, 3.447938517765625*^9}, {3.447938690859375*^9, 
   3.447938742890625*^9}, 3.447948745546875*^9, {3.4575059564375*^9, 
   3.457505973640625*^9}, 3.4575489668125*^9, 3.457549249203125*^9, {
   3.5400958936805873`*^9, 3.5400958945243263`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"logicUnit", "=", ".5"}], ";"}]], "Input",
 CellChangeTimes->{{3.4463791516230717`*^9, 3.446379160381404*^9}, {
   3.446379288210043*^9, 3.446379292911693*^9}, 3.446637522625*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemEquationsDa", " ", "=", " ", 
   RowBox[{"{", "\n", 
    RowBox[{
     RowBox[{"y1f", " ", "-", " ", 
      FractionBox[
       RowBox[{" ", 
        RowBox[{"Abs", "[", "y1", "]"}]}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"thau", " ", "s"}], " ", "+", "1"}], ")"}]]}], ",", "\n", 
     RowBox[{"y2f", " ", "-", " ", 
      FractionBox[
       RowBox[{"Abs", "[", "y2", "]"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"thau", " ", "s"}], " ", "+", "1"}], ")"}]]}], ",", "\n", 
     RowBox[{"y3f", " ", "-", " ", 
      FractionBox[
       RowBox[{" ", 
        RowBox[{"Abs", "[", "y3", "]"}]}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"thau", " ", "s"}], " ", "+", "1"}], ")"}]]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"s1", "-", 
      RowBox[{"onPositive", "[", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"onPositive", "[", 
           RowBox[{
            RowBox[{"Abs", "[", "y1f", "]"}], "-", 
            RowBox[{"Abs", "[", "y10", "]"}]}], "]"}], "+", 
          RowBox[{"onPositive", "[", 
           RowBox[{
            RowBox[{"Abs", "[", "y2f", "]"}], "-", 
            RowBox[{"Abs", "[", "y20", "]"}]}], "]"}], "+", 
          RowBox[{"onPositive", "[", 
           RowBox[{
            RowBox[{"Abs", "[", "y3f", "]"}], "-", 
            RowBox[{"Abs", "[", "y30", "]"}]}], "]"}]}], ")"}], "+", "sOn", 
        "-", "logicUnit"}], "]"}]}]}], "\n", "\t\t\t\t\t", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.4462268279375*^9, 3.4462268990625*^9}, {
   3.446356063226486*^9, 3.4463561206800156`*^9}, {3.446356288882064*^9, 
   3.4463563806471014`*^9}, {3.4463566400204415`*^9, 
   3.4463566478641415`*^9}, {3.446356740988305*^9, 3.4463567625974035`*^9}, {
   3.446356847065072*^9, 3.446356909189277*^9}, {3.4463569505637474`*^9, 
   3.446356987860145*^9}, {3.4463570410000896`*^9, 3.446357063812298*^9}, {
   3.446379127283964*^9, 3.446379143364324*^9}, {3.446379179506104*^9, 
   3.4463792334299517`*^9}, {3.4463792634678044`*^9, 3.4463794425834913`*^9}, 
   3.446379541396244*^9, {3.446379638271485*^9, 3.4463796519105387`*^9}, {
   3.4463796846255193`*^9, 3.446379724605288*^9}, {3.4463798022994614`*^9, 
   3.4463798170008926`*^9}, {3.4463798623237963`*^9, 3.446379865823597*^9}, {
   3.4463961242555237`*^9, 3.4463961327898855`*^9}, {3.446396203550064*^9, 
   3.4463962447213287`*^9}, 3.4463963098476686`*^9, {3.4463973335728197`*^9, 
   3.446397362760133*^9}, {3.446397401369261*^9, 3.4463974497283263`*^9}, {
   3.446397489071824*^9, 3.44639769571055*^9}, {3.446397742851082*^9, 
   3.4463977445386252`*^9}, {3.4463979590128655`*^9, 
   3.4463980085141325`*^9}, {3.4463980572334223`*^9, 
   3.4463980630771723`*^9}, {3.4463981016865473`*^9, 
   3.4463981226552973`*^9}, {3.4463981943115473`*^9, 
   3.4463981991396723`*^9}, {3.4463982617334223`*^9, 3.446398369951914*^9}, {
   3.4463984402952137`*^9, 3.4463984526388845`*^9}, {3.446398517966591*^9, 
   3.4463986648560505`*^9}, {3.4463987018555765`*^9, 
   3.4463987746365695`*^9}, {3.4463988146529627`*^9, 
   3.4463990151255617`*^9}, {3.44639905628255*^9, 3.446399129798175*^9}, {
   3.446399189704425*^9, 3.446399280673175*^9}, {3.4464006876851635`*^9, 
   3.4464007123567224`*^9}, {3.4464007914182105`*^9, 
   3.4464007992306104`*^9}, {3.4464008721046777`*^9, 3.446400872620296*^9}, 
   3.4464528975154915`*^9, {3.4464634783653283`*^9, 3.4464634912715783`*^9}, {
   3.4465792743125*^9, 3.446579279671875*^9}, {3.446579491765625*^9, 
   3.446579505828125*^9}, {3.446620452265625*^9, 3.44662065565625*^9}, {
   3.446637497078125*^9, 3.4466375061875*^9}, {3.4466375385*^9, 
   3.446637551078125*^9}, {3.446637938234375*^9, 3.446637941484375*^9}, {
   3.446666699421875*^9, 3.4466667018125*^9}, {3.44666719959375*^9, 
   3.446667200734375*^9}, {3.446668322515625*^9, 3.446668332921875*^9}, {
   3.4466684914375*^9, 3.44666852496875*^9}, {3.446668996703125*^9, 
   3.446669001703125*^9}, {3.446669166515625*^9, 3.44666917659375*^9}, {
   3.44670421915625*^9, 3.4467042908125*^9}, {3.4467044806875*^9, 
   3.446704481890625*^9}, {3.446704535734375*^9, 3.446704553015625*^9}, {
   3.446704624859375*^9, 3.446704666*^9}, {3.446704786796875*^9, 
   3.446704813015625*^9}, 3.44670733509375*^9, {3.446707379109375*^9, 
   3.446707485484375*^9}, 3.446708362203125*^9, {3.44670887778125*^9, 
   3.44670891478125*^9}, {3.446741223921875*^9, 3.446741256296875*^9}, 
   3.446744558578125*^9, {3.446831900125*^9, 3.446831915421875*^9}, 
   3.447343669203125*^9, {3.4473437035*^9, 3.447343747203125*^9}, {
   3.447343851296875*^9, 3.44734385509375*^9}, {3.447343911203125*^9, 
   3.44734391234375*^9}, {3.44760895534375*^9, 3.4476091104375*^9}, {
   3.4476091595*^9, 3.44760928015625*^9}, 3.447688292375*^9, {
   3.44775987934375*^9, 3.44775990678125*^9}, {3.447938789671875*^9, 
   3.44793885996875*^9}, {3.447947536203125*^9, 3.447947793421875*^9}, {
   3.44794782525*^9, 3.447947856515625*^9}, {3.447947914734375*^9, 
   3.44794793440625*^9}, {3.447948486796875*^9, 3.447948494953125*^9}, {
   3.447950475734375*^9, 3.447950480359375*^9}, {3.4479514369375*^9, 
   3.447951552625*^9}, {3.457505719859375*^9, 3.45750590196875*^9}, {
   3.457506035859375*^9, 3.457506069921875*^9}, {3.457506159390625*^9, 
   3.45750616184375*^9}, 3.457506201890625*^9, {3.45754897903125*^9, 
   3.45754900778125*^9}, {3.5400959878200073`*^9, 3.540095995694906*^9}, {
   3.540102295915688*^9, 3.540102306962351*^9}, 3.540102359555091*^9, 
   3.5547852646756573`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"boundaryEquations", " ", "=", " ", 
   RowBox[{"{", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.5400959186490173`*^9, 3.5400959186490173`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemVariables", " ", "=", " ", 
   RowBox[{"{", 
    RowBox[{"y1f", ",", "y2f", ",", "y3f", ",", "s1"}], "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.540095912227225*^9, 3.5400959122428493`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(1, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.568234835495387*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(2, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.5682348355103884`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(3, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.5682348355113883`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Part :: \
partd\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.5682348355113883`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"SignalStateMonitor\\\"\\)\\), \
\\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"SignalStateMonitor.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"SignalStateMonitor.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\
\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] 0.2`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Py1\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
0.4`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \[Rule] \
\\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Py2\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\[LeftSkeleton] 5 \[RightSkeleton]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.8\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Py3f\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \\(\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\(\\(\\\"\\\" \
\[Ellipsis] \\\"e\\\"\\)\\) \[Rule] \\(\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\)\
\\)\\), \\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"SignalStateMonitor.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"SignalStateMonitor.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\
\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] 0.2`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Py1\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
0.4`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \[Rule] \
\\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Py2\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\[LeftSkeleton] 5 \[RightSkeleton]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.8\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Py3f\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.56823483553539*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.56823483553639*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.2`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"x\
\\\" \[Rule] 0.2`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.5682348355373898`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.5682348355373898`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.4`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"x\
\\\" \[Rule] 0.4`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.56823483553839*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.56823483553939*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.56823483553939*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.6000000000000001`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.6000000000000001`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.56823483554039*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.5401003962847404`*^9, 3.5547157282550545`*^9, 
  3.5547853129156833`*^9, 3.568233871952276*^9, 3.56823483554039*^9}],

Cell[BoxData["\<\"SignalStateMonitor.xml\"\>"], "Output",
 CellChangeTimes->{3.5401003964097414`*^9, 3.554715728286298*^9, 
  3.5547853129781837`*^9, 3.5682338719792776`*^9, 3.56823483554139*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["Waypoint", "Subtitle",
 PageWidth->WindowWidth,
 CellChangeTimes->{{3.4464606636627417`*^9, 3.4464606852542763`*^9}, {
   3.4464607234102488`*^9, 3.4464607249246225`*^9}, 3.446741120140625*^9, {
   3.447510244140625*^9, 3.447510251796875*^9}, 3.4475750579871836`*^9, 
   3.540100342846898*^9, {3.5406990325283465`*^9, 3.540699034809538*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Signal\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<Waypoint\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Waypoint Controller with way points\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFile", "[", 
   RowBox[{"domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.520880152296875*^9, 3.520880230078125*^9}, 
   3.520932125875*^9, 3.520932753984375*^9, {3.52093324790625*^9, 
   3.520933251453125*^9}, {3.521775289609375*^9, 3.521775289921875*^9}, {
   3.52249560790625*^9, 3.522495611953125*^9}, {3.5353435506144285`*^9, 
   3.5353435625103617`*^9}, {3.538982066538947*^9, 3.5389820811170716`*^9}, {
   3.538982378538947*^9, 3.538982399913947*^9}, 3.5406990282628307`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "s1", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<state 1\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xc", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<x-position\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "yc", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<y-position\>\""}], "}"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.446223460296875*^9, 3.44622356096875*^9}, {
   3.4462236030625*^9, 3.446223670484375*^9}, {3.446223703640625*^9, 
   3.4462238429375*^9}, {3.4462265591875*^9, 3.44622670078125*^9}, {
   3.4463566622546744`*^9, 3.4463566920669837`*^9}, 3.4463567240041475`*^9, {
   3.446357070530962*^9, 3.446357073718421*^9}, 3.446379656956832*^9, {
   3.4464008796202064`*^9, 3.44640090863546*^9}, {3.446452519793661*^9, 
   3.446452619136775*^9}, {3.446460814522464*^9, 3.446460921949324*^9}, {
   3.446460972761937*^9, 3.4464609779947715`*^9}, {3.446461042663227*^9, 
   3.4464610541442213`*^9}, {3.446522488390625*^9, 3.446522516109375*^9}, {
   3.446522610078125*^9, 3.446522622265625*^9}, {3.44652284971875*^9, 
   3.446522850484375*^9}, 3.446524524569768*^9, {3.44657946146875*^9, 
   3.44657946196875*^9}, {3.446637579390625*^9, 3.446637622890625*^9}, {
   3.44663767678125*^9, 3.446637762140625*^9}, {3.446741331921875*^9, 
   3.446741411921875*^9}, {3.4467425738125*^9, 3.446742751625*^9}, {
   3.44674492665625*^9, 3.446744933046875*^9}, 3.446747299859375*^9, {
   3.446834626125*^9, 3.446834892703125*^9}, {3.446834927984375*^9, 
   3.4468349860625*^9}, 3.446835489578125*^9, {3.447510352625*^9, 
   3.447510472859375*^9}, {3.44751067409375*^9, 3.447510704984375*^9}, {
   3.447510735484375*^9, 3.447510761828125*^9}, {3.447510805046875*^9, 
   3.447510816484375*^9}, 3.44751085640625*^9, 3.447603182109375*^9, {
   3.538980896351447*^9, 3.538980896882697*^9}, {3.538981183570197*^9, 
   3.5389812494920716`*^9}, {3.5389822003045716`*^9, 
   3.5389822028670716`*^9}, {3.538986645364492*^9, 3.5389866618487616`*^9}, {
   3.5389891590002813`*^9, 3.5389891657659063`*^9}, {3.5389892010002813`*^9, 
   3.5389892017346563`*^9}, {3.5406990465436125`*^9, 3.540699071167982*^9}, 
   3.5406993708688526`*^9, 3.5407164521525216`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "R", ",", "6367500.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Earth radius\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alt1", ",", "0", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<altitude 1\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "v1", ",", "200", ",", "double", ",", "\"\<m/s\>\"", ",", 
       "\"\<ref. velocity 1\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "wptol", ",", "500", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<waypoint tolerance\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "xcWp1", ",", "15.1669", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<waypoint longitude\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ycWp1", ",", "58.3812", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<waypoint lattitude\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.447510830078125*^9, 3.44751083565625*^9}, {
   3.4475108769375*^9, 3.447510899515625*^9}, {3.447602234390625*^9, 
   3.44760241884375*^9}, {3.5389808973358216`*^9, 3.5389809088045716`*^9}, {
   3.540299841336206*^9, 3.5402998947105227`*^9}, {3.54030034670111*^9, 
   3.540300353247817*^9}, {3.5403003964185867`*^9, 3.5403003976216807`*^9}, {
   3.5403004813382874`*^9, 3.5403004814632845`*^9}, {3.540300521993497*^9, 
   3.5403005797420187`*^9}, {3.5403006240065107`*^9, 
   3.5403007770089912`*^9}, {3.5403008357136188`*^9, 3.540300860057992*^9}, 
   3.5403010668564873`*^9, {3.5405282925839195`*^9, 3.5405282933651495`*^9}, {
   3.5406990498091545`*^9, 3.5406990889800262`*^9}, {3.5407154658013244`*^9, 
   3.540715466691932*^9}, {3.5407165552467604`*^9, 3.5407165770609355`*^9}, {
   3.5407170264731617`*^9, 3.5407170624736223`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "set1", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<set state\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "altitudeRef", ",", "1000.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<reference altitude\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "headingRef", ",", "1000.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<reference heading\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"velocityRef", ",", "1000.", ",", 
       RowBox[{"double", "/", "s"}], ",", "\"\<m\>\"", ",", 
       "\"\<reference velocity\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "distanceWp", ",", "1000.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<distance to wp\>\""}], "}"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.446223415796875*^9, 3.44622341625*^9}, {
   3.446226723234375*^9, 3.446226798453125*^9}, {3.446522549734375*^9, 
   3.4465225531875*^9}, {3.44652258853125*^9, 3.44652273034375*^9}, 
   3.44652281059375*^9, {3.446621606296875*^9, 3.446621667125*^9}, {
   3.446621712171875*^9, 3.446621755359375*^9}, 3.446621793125*^9, {
   3.44674142409375*^9, 3.44674143390625*^9}, 3.446747302765625*^9, {
   3.446834900828125*^9, 3.44683492328125*^9}, {3.447510302828125*^9, 
   3.447510331328125*^9}, {3.4475981338125*^9, 3.447598192421875*^9}, {
   3.538980909382697*^9, 3.538980914038947*^9}, {3.5389812739608216`*^9, 
   3.538981316663947*^9}, {3.538982180538947*^9, 3.538982188507697*^9}, 
   3.538986625723993*^9, 3.540699094183018*^9, {3.540699282068885*^9, 
   3.540699352643463*^9}, 3.5407154716762114`*^9, {3.5407164642928357`*^9, 
   3.540716479542445*^9}, 3.54071651236973*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"d2r", "=", 
  FractionBox[
   RowBox[{"N", "[", 
    RowBox[{"Pi", ",", "6"}], "]"}], "180"]}]], "Input",
 CellChangeTimes->{{3.5402959560398293`*^9, 3.5402959714868135`*^9}}],

Cell[BoxData["0.01745329251994329576923690768488613444`6."], "Output",
 CellChangeTimes->{
  3.540296042342821*^9, 3.5402960830709543`*^9, 3.5405265236283913`*^9, 
   3.5405283355828185`*^9, 3.54053090268988*^9, 3.540534765502161*^9, 
   3.5405442676051855`*^9, 3.540557883511408*^9, 3.540699472672019*^9, {
   3.5407154469423113`*^9, 3.5407154752073936`*^9}, 3.540717071333111*^9, 
   3.5547157284581327`*^9, 3.5682338723643*^9, 3.568234835839407*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"r2d", "=", 
  FractionBox["180", 
   RowBox[{"N", "[", 
    RowBox[{"Pi", ",", "6"}], "]"}]]}]], "Input",
 CellChangeTimes->{{3.540296022924648*^9, 3.5402960391064587`*^9}}],

Cell[BoxData["57.2957795130823208767981548141051463364`6."], "Output",
 CellChangeTimes->{
  3.5402960447192802`*^9, 3.5402960831022234`*^9, 3.540526523784624*^9, 
   3.540528335598443*^9, 3.540530902705505*^9, 3.540534765533412*^9, 
   3.5405442676208105`*^9, 3.540557883839528*^9, 3.5406994727032623`*^9, {
   3.5407154469579363`*^9, 3.540715475238643*^9}, 3.540717071348736*^9, 
   3.5547157284737544`*^9, 3.5682338724013014`*^9, 3.5682348358734093`*^9}]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{"distanceWpe", "=", 
   RowBox[{"d2r", " ", 
    RowBox[{"Sqrt", "[", 
     RowBox[{
      RowBox[{
       SuperscriptBox[
        RowBox[{"(", 
         RowBox[{"xc", "-", "xcWp1"}], ")"}], "2"], 
       SuperscriptBox[
        RowBox[{"(", 
         RowBox[{"R", " ", 
          RowBox[{"Cos", "[", 
           RowBox[{"d2r", " ", "yc"}], "]"}]}], ")"}], "2"]}], "+", 
      RowBox[{
       SuperscriptBox[
        RowBox[{"(", 
         RowBox[{"yc", "-", "ycWp1"}], ")"}], "2"], 
       SuperscriptBox["R", "2"]}]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"head1", "=", 
   RowBox[{"Atan2L", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"(", 
       RowBox[{"ycWp1", "-", "yc"}], ")"}], "R"}], ",", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"xcWp1", "-", "xc"}], ")"}], "R", " ", 
      RowBox[{"Cos", "[", 
       RowBox[{"d2r", " ", "yc"}], "]"}]}]}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.446452638339777*^9, 3.4464527818076086`*^9}, 
   3.446452850459015*^9, {3.4464631607090783`*^9, 3.4464631828497033`*^9}, {
   3.4464634087559533`*^9, 3.4464634630059533`*^9}, 3.4464635408809533`*^9, {
   3.4464635848497033`*^9, 3.4464635915684533`*^9}, {3.4464636283809533`*^9, 
   3.4464636733028283`*^9}, {3.4464637086622033`*^9, 
   3.4464637303184533`*^9}, {3.446525470644552*^9, 3.446525515206767*^9}, {
   3.446622352859375*^9, 3.446622357625*^9}, {3.44666587075*^9, 
   3.446665888046875*^9}, {3.446666884390625*^9, 3.446666921765625*^9}, 
   3.446666958625*^9, {3.446667170421875*^9, 3.446667191203125*^9}, {
   3.446668162671875*^9, 3.446668165578125*^9}, {3.446668874546875*^9, 
   3.446668879*^9}, {3.446704056*^9, 3.446704195796875*^9}, 
   3.44670435046875*^9, {3.44670455921875*^9, 3.44670461946875*^9}, 
   3.446705553984375*^9, {3.446707892875*^9, 3.446707900703125*^9}, {
   3.4467083515*^9, 3.4467083814375*^9}, {3.446741457359375*^9, 
   3.446741576421875*^9}, {3.446741610890625*^9, 3.44674168228125*^9}, {
   3.4467417159375*^9, 3.44674171771875*^9}, {3.44674175265625*^9, 
   3.446742042609375*^9}, {3.446742414859375*^9, 3.44674242353125*^9}, {
   3.4468350029375*^9, 3.446835136421875*^9}, 3.447343461625*^9, {
   3.44750555559375*^9, 3.447505567140625*^9}, {3.447509747015625*^9, 
   3.447509802265625*^9}, {3.447518087296875*^9, 3.447518089640625*^9}, 
   3.44752085290625*^9, {3.44752238603125*^9, 3.447522408546875*^9}, {
   3.5389857278341665`*^9, 3.5389857349747915`*^9}, 3.5389865747711935`*^9, {
   3.538988947876569*^9, 3.5389889557358932`*^9}, {3.538989098141232*^9, 
   3.538989122094204*^9}, {3.5402999305068293`*^9, 3.540299995255586*^9}, 
   3.5403002257667055`*^9, {3.5403014115241156`*^9, 3.540301420180199*^9}, {
   3.5403017179731913`*^9, 3.5403017347236204`*^9}, 3.5403019165564003`*^9, {
   3.5405280084661927`*^9, 3.540528053215047*^9}, {3.5405281010419474`*^9, 
   3.540528219960778*^9}, {3.540530815627713*^9, 3.540530830502842*^9}, {
   3.5405343648939686`*^9, 3.540534402205991*^9}, {3.540544214744796*^9, 
   3.5405442454641356`*^9}, {3.540559001559596*^9, 3.540559006840779*^9}, {
   3.5406991201804276`*^9, 3.5406991275516043`*^9}, {3.540699207589981*^9, 
   3.5406992094015875`*^9}, {3.5406995146162834`*^9, 3.54069956218436*^9}, {
   3.5407164056693363`*^9, 3.5407164274344044`*^9}, {3.5407164874641175`*^9, 
   3.5407165094479294`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"set1", ",", 
       RowBox[{"s1", " ", 
        RowBox[{"onPositive", "[", 
         RowBox[{"(", 
          RowBox[{"wptol", "-", "distanceWpe"}], ")"}], "]"}]}]}], "}"}], ",",
      "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"altitudeRef", ",", 
       RowBox[{"s1", " ", "alt1"}]}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"headingRef", ",", 
       RowBox[{"s1", " ", "head1"}]}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"velocityRef", ",", 
       RowBox[{"s1", " ", "v1"}]}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"distanceWp", ",", "distanceWpe"}], "}"}]}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.538980959601447*^9, 3.5389811518983216`*^9}, {
   3.538981699351447*^9, 3.538981711913947*^9}, {3.538982108538947*^9, 
   3.5389821468670716`*^9}, {3.538982445195197*^9, 3.5389824714920716`*^9}, 
   3.5389857465685415`*^9, 3.5389858448810415`*^9, {3.5389858878654165`*^9, 
   3.5389858906466665`*^9}, 3.5389859873185415`*^9, {3.5389861225372915`*^9, 
   3.5389861413029165`*^9}, {3.5389864473341665`*^9, 
   3.5389864935841665`*^9}, {3.538986543552644*^9, 3.5389865651618805`*^9}, {
   3.5389867534888*^9, 3.538986756879403*^9}, {3.5389888536740465`*^9, 
   3.5389888572521486`*^9}, {3.5389890403759766`*^9, 
   3.5389890852038145`*^9}, {3.5389891392190943`*^9, 3.538989145109681*^9}, {
   3.539191613515625*^9, 3.5391916643125*^9}, {3.539193119875*^9, 
   3.53919318265625*^9}, {3.5403002522504025`*^9, 3.540300284733946*^9}, 
   3.5405308840962486`*^9, {3.540557801449958*^9, 3.5405578394650965`*^9}, {
   3.5406991370622964`*^9, 3.5406992554257708`*^9}, {3.5406993956066556`*^9, 
   3.5406994092717934`*^9}, {3.5407164338404903`*^9, 
   3.5407164343092284`*^9}, {3.540716492338993*^9, 3.540716505807398*^9}, {
   3.540716538354838*^9, 3.5407165448709636`*^9}, {3.540717325299977*^9, 
   3.5407173312530255`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"SignalWaypoint\\\"\\)\\), \\(\\(\\(\
\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\) \[Rule] \\(\\(\\\"\\\" \[Ellipsis] \
\\\"\\\"\\)\\)\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \
\\(\\({\\(\\(\\\"isopath\\\" \[Rule] \\\"SignalWaypoint.svg\\\"\\)\\), \\(\\(\
\\\"iconrotation\\\" \[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"SignalWaypoint.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] 0.25`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Ps1\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
0.5`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \[Rule] \
\\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Pxc\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\[LeftSkeleton] 5 \[RightSkeleton]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.833333\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"PdistanceWp\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\(\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\) \[Rule] \\(\\(\\\"\\\" \
\[Ellipsis] \\\"\\\"\\)\\)}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"SignalWaypoint\\\"\\)\\), \\(\\(\\\"displayname\\\" \[Rule] \
\\\"SignalWaypoint\\\"\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\
\", \\(\\({\\(\\(\\\"isopath\\\" \[Rule] \\\"SignalWaypoint.svg\\\"\\)\\), \
\\(\\(\\\"iconrotation\\\" \[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \
\[Rule] \\\"SignalWaypoint.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] 0.25`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Ps1\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\[LeftSkeleton] \
6 \[RightSkeleton]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\
\\(\\\"x\\\" \[Rule] \\\"0.833333\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \
\\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \
\[Rule] \\\"PdistanceWp\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.540699472828236*^9, {3.5407154470048103`*^9, 3.5407154753011417`*^9}, 
   3.540717071411237*^9, 3.5547157285206184`*^9, 3.568233872500307*^9, 
   3.568234835941413*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.540699472828236*^9, {3.5407154470048103`*^9, 3.5407154753011417`*^9}, 
   3.540717071411237*^9, 3.5547157285206184`*^9, 3.568233872500307*^9, 
   3.5682348359424133`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.25`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.25`\\)\[NoBreak] is not a valid value for \
an attribute in an XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.540699472828236*^9, {3.5407154470048103`*^9, 3.5407154753011417`*^9}, 
   3.540717071411237*^9, 3.5547157285206184`*^9, 3.568233872500307*^9, 
   3.5682348359434133`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.540699472828236*^9, {3.5407154470048103`*^9, 3.5407154753011417`*^9}, 
   3.540717071411237*^9, 3.5547157285206184`*^9, 3.568233872500307*^9, 
   3.5682348359434133`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.5`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"x\
\\\" \[Rule] 0.5`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.540699472828236*^9, {3.5407154470048103`*^9, 3.5407154753011417`*^9}, 
   3.540717071411237*^9, 3.5547157285206184`*^9, 3.568233872500307*^9, 
   3.568234835944413*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.540699472828236*^9, {3.5407154470048103`*^9, 3.5407154753011417`*^9}, 
   3.540717071411237*^9, 3.5547157285206184`*^9, 3.568233872500307*^9, 
   3.568234835945413*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.540699472828236*^9, {3.5407154470048103`*^9, 3.5407154753011417`*^9}, 
   3.540717071411237*^9, 3.5547157285206184`*^9, 3.568233872500307*^9, 
   3.568234835945413*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.75`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.75`\\)\[NoBreak] is not a valid value for \
an attribute in an XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.540699472828236*^9, {3.5407154470048103`*^9, 3.5407154753011417`*^9}, 
   3.540717071411237*^9, 3.5547157285206184`*^9, 3.568233872500307*^9, 
   3.568234835946413*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.538982365038947*^9, 3.5389824050233216`*^9, {3.5389824552420716`*^9, 
   3.538982477226447*^9}, {3.538986668333095*^9, 3.5389866907704515`*^9}, 
   3.538986797691642*^9, 3.5389882830822463`*^9, 3.5389892198909063`*^9, 
   3.539191696828125*^9, 3.5401003638157825`*^9, 3.5403003328733387`*^9, 
   3.5403004043246346`*^9, 3.540300884230486*^9, 3.540301073137697*^9, 
   3.5403019303223777`*^9, 3.540528336129679*^9, 3.5405309034398746`*^9, 
   3.540534766064672*^9, 3.5405442682145724`*^9, 3.540557889198835*^9, 
   3.540699472828236*^9, {3.5407154470048103`*^9, 3.5407154753011417`*^9}, 
   3.540717071411237*^9, 3.5547157285206184`*^9, 3.568233872500307*^9, 
   3.5682348359474134`*^9}],

Cell[BoxData["\<\"SignalWaypoint.xml\"\>"], "Output",
 CellChangeTimes->{
  3.538982365163947*^9, 3.538982405070197*^9, {3.5389824552733216`*^9, 
   3.5389824772420716`*^9}, {3.5389866683643446`*^9, 3.5389866908017015`*^9}, 
   3.538986797722892*^9, 3.5389882831134963`*^9, 3.5389892199065313`*^9, 
   3.5391916979375*^9, 3.5401003651907916`*^9, 3.540300333170206*^9, 
   3.540300404402757*^9, 3.5403008843242383`*^9, 3.540301073184572*^9, 
   3.54030193041613*^9, 3.540528336239052*^9, 3.540530903564874*^9, 
   3.540534766158424*^9, 3.5405442683708253`*^9, 3.5405578901675725`*^9, 
   3.5406994742966757`*^9, {3.540715447067309*^9, 3.5407154753167667`*^9}, 
   3.540717071426862*^9, 3.5547157285206184`*^9, 3.568233872519308*^9, 
   3.5682348359484134`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["FlightRecorder", "Subtitle",
 CellChangeTimes->{{3.522430442609375*^9, 3.522430450578125*^9}, {
  3.555912111016549*^9, 3.555912112485299*^9}, {3.556889553890625*^9, 
  3.556889559234375*^9}, {3.556891063125*^9, 3.556891064515625*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Aero\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<FlightRecorder\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{
  "brief", "=", "\"\<Generates a flight path for .kml for Google earth\>\""}],
   ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFile", "[", 
   RowBox[{"domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"ResetComponentVariables", "[", "]"}]}], "Input",
 CellChangeTimes->{{3.52243043575*^9, 3.522430437953125*^9}, {
  3.555912115813424*^9, 3.555912150141549*^9}, {3.556889571703125*^9, 
  3.556889613046875*^9}, {3.556891055703125*^9, 3.556891058140625*^9}, {
  3.556891762046875*^9, 3.556891763421875*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "longitude", ",", "0.", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<longitude\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "lattitude", ",", "0.", ",", "double", ",", "\"\<deg\>\"", ",", 
       "\"\<lattitude\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "altitude", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<altitude\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "phi", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<roll angle\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "theta", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<tip angle\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "psi", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<yaw angle\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "timeE", ",", "0.", ",", "double", ",", "\"\<rad\>\"", ",", 
       "\"\<Effective time\>\""}], "}"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.5224305394375*^9, 3.5224305394375*^9}, {
   3.52243058465625*^9, 3.5224305981875*^9}, 3.52328822021875*^9, {
   3.5232883535*^9, 3.523288359328125*^9}, {3.531855769421875*^9, 
   3.531855790125*^9}, {3.531855974453125*^9, 3.53185600171875*^9}, {
   3.531856163125*^9, 3.531856187796875*^9}, {3.5411602367910447`*^9, 
   3.5411602434471664`*^9}, 3.5559123321420507`*^9, {3.55594922259375*^9, 
   3.555949263484375*^9}, {3.55688962021875*^9, 3.5568896814375*^9}, {
   3.556889867703125*^9, 3.556889884421875*^9}, {3.556889996796875*^9, 
   3.556890045578125*^9}, 3.556891502125*^9, {3.55690591578125*^9, 
   3.556905933359375*^9}, {3.556906027125*^9, 3.55690603809375*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "altitudeScale", ",", "20.0", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Scaling of altitude\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "timeStepRec", ",", "10.", ",", "double", ",", "\"\<sec\>\"", ",", 
       "\"\<time step for recording\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.522430544015625*^9, 3.522430601609375*^9}, {
   3.522431017015625*^9, 3.5224310198125*^9}, 3.52328822196875*^9, {
   3.52328833575*^9, 3.5232883406875*^9}, {3.531855796109375*^9, 
   3.5318558308125*^9}, {3.531856011921875*^9, 3.531856035125*^9}, {
   3.541161713191944*^9, 3.54116171961386*^9}, {3.5411621661130204`*^9, 
   3.541162205831262*^9}, {3.5411623055956097`*^9, 3.5411623262047215`*^9}, {
   3.555912340360853*^9, 3.5559123619703665`*^9}, {3.555912401689371*^9, 
   3.5559124347520823`*^9}, {3.555912932927146*^9, 3.555912945817853*^9}, {
   3.555913203147625*^9, 3.5559132086945353`*^9}, {3.555945723875*^9, 
   3.555945778375*^9}, {3.555946056125*^9, 3.555946057140625*^9}, {
   3.555946906875*^9, 3.55594692371875*^9}, 3.55594922825*^9, 
   3.555949390765625*^9, {3.556889686828125*^9, 3.556889707453125*^9}, {
   3.556889888984375*^9, 3.55688989375*^9}, {3.55689101684375*^9, 
   3.5568910434375*^9}, 3.55689175503125*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
     "scaledAltitude", ",", "0.", ",", "double", ",", "\"\<\>\"", ",", 
      "\"\<Scaling of altitude\>\""}], "}"}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.522430544015625*^9, 3.522430601609375*^9}, {
   3.522431017015625*^9, 3.5224310198125*^9}, 3.52328822196875*^9, {
   3.52328833575*^9, 3.5232883406875*^9}, {3.531855796109375*^9, 
   3.5318558308125*^9}, {3.531856011921875*^9, 3.531856035125*^9}, {
   3.541161713191944*^9, 3.54116171961386*^9}, {3.5411621661130204`*^9, 
   3.541162205831262*^9}, {3.5411623055956097`*^9, 3.5411623262047215`*^9}, {
   3.555912340360853*^9, 3.5559123619703665`*^9}, {3.555912401689371*^9, 
   3.5559124347520823`*^9}, {3.555912932927146*^9, 3.555912945817853*^9}, {
   3.555913203147625*^9, 3.5559132086945353`*^9}, {3.555945723875*^9, 
   3.555945778375*^9}, {3.555946056125*^9, 3.555946057140625*^9}, {
   3.555946906875*^9, 3.55594692371875*^9}, 3.55594922825*^9, 
   3.555949390765625*^9, {3.556889686828125*^9, 3.556889707453125*^9}, {
   3.55688974846875*^9, 3.556889766796875*^9}, 3.55688980225*^9, 
   3.5568915055625*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"expressions", "=", 
  RowBox[{"{", "\[IndentingNewLine]", 
   RowBox[{"{", 
    RowBox[{"scaledAltitude", ",", 
     RowBox[{"altitudeScale", "*", "altitude"}]}], "}"}], 
   "\[IndentingNewLine]", "}"}]}]], "Input",
 CellChangeTimes->{{3.555931492906174*^9, 3.5559315232969933`*^9}, {
   3.555940258109375*^9, 3.55594027396875*^9}, {3.555940336875*^9, 
   3.555940382640625*^9}, {3.555940524578125*^9, 3.555940542*^9}, 
   3.55594057240625*^9, {3.555940920703125*^9, 3.55594095309375*^9}, {
   3.555941001953125*^9, 3.55594109125*^9}, {3.555941317453125*^9, 
   3.55594132215625*^9}, {3.5559486410625*^9, 3.555948643921875*^9}, {
   3.555948706546875*^9, 3.555948707921875*^9}, {3.5559899821152096`*^9, 
   3.5559899836308537`*^9}, {3.55688980971875*^9, 3.556889855984375*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"scaledAltitude", ",", 
    RowBox[{"altitude", " ", "altitudeScale"}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{3.556889935734375*^9, 3.556890209328125*^9, 
  3.55689108484375*^9, 3.55689155178125*^9, 3.556891660078125*^9, 
  3.556891773734375*^9, 3.568233872792324*^9, 3.5682348360394187`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\(\\(\\\"A\\\" \[Ellipsis] \
\\\"r\\\"\\)\\)\\)\\), \\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"AeroFlightRecorder.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"AeroFlightRecorder.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\
\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] 0.125`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Plongitude\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] 0.25`\
\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"a\\\" \[Rule] \
\\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Plattitude\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\[LeftSkeleton] 5 \[RightSkeleton]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.5\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"PscaledAltitude\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\(\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\) \[Rule] \\(\\(\\\"\\\" \
\[Ellipsis] \\\"\\\"\\)\\)}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"AeroFlightRecorder\\\"\\)\\), \\(\\(\\\"displayname\\\" \[Rule] \
\\(\\(\\\"Ae\\\" \[Ellipsis] \\\"er\\\"\\)\\)\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"AeroFlightRecorder.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"AeroFlightRecorder.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\
\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] 0.125`\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"0\\\"\\)\\), \
\\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Plongitude\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\
\[LeftSkeleton] 6 \[RightSkeleton]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpose\
\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \\\"0.5\\\"\\)\\), \\(\\(\\\"y\\\" \
\[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \
\\(\\(\\\"name\\\" \[Rule] \\\"PscaledAltitude\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538722569572625*^9, 3.5389775637865267`*^9, 
  3.5547158280305786`*^9, 3.555948850984375*^9, 3.55594916653125*^9, 
  3.555949305953125*^9, 3.55594939765625*^9, 3.555988292309985*^9, 
  3.5559900813977304`*^9, 3.555997021684737*^9, 3.555997509387944*^9, 
  3.55688993596875*^9, 3.556890209359375*^9, 3.556891084859375*^9, 
  3.55689157740625*^9, 3.556891660140625*^9, 3.556891773765625*^9, 
  3.5682338728523273`*^9, 3.5682348360924215`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538722569572625*^9, 3.5389775637865267`*^9, 
  3.5547158280305786`*^9, 3.555948850984375*^9, 3.55594916653125*^9, 
  3.555949305953125*^9, 3.55594939765625*^9, 3.555988292309985*^9, 
  3.5559900813977304`*^9, 3.555997021684737*^9, 3.555997509387944*^9, 
  3.55688993596875*^9, 3.556890209359375*^9, 3.556891084859375*^9, 
  3.55689157740625*^9, 3.556891660140625*^9, 3.556891773765625*^9, 
  3.5682338728523273`*^9, 3.568234836098422*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.125`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.125`\\)\[NoBreak] is not a valid value \
for an attribute in an XMLElement. The value of the attribute must be a \
string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538722569572625*^9, 3.5389775637865267`*^9, 
  3.5547158280305786`*^9, 3.555948850984375*^9, 3.55594916653125*^9, 
  3.555949305953125*^9, 3.55594939765625*^9, 3.555988292309985*^9, 
  3.5559900813977304`*^9, 3.555997021684737*^9, 3.555997509387944*^9, 
  3.55688993596875*^9, 3.556890209359375*^9, 3.556891084859375*^9, 
  3.55689157740625*^9, 3.556891660140625*^9, 3.556891773765625*^9, 
  3.5682338728523273`*^9, 3.568234836099422*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538722569572625*^9, 3.5389775637865267`*^9, 
  3.5547158280305786`*^9, 3.555948850984375*^9, 3.55594916653125*^9, 
  3.555949305953125*^9, 3.55594939765625*^9, 3.555988292309985*^9, 
  3.5559900813977304`*^9, 3.555997021684737*^9, 3.555997509387944*^9, 
  3.55688993596875*^9, 3.556890209359375*^9, 3.556891084859375*^9, 
  3.55689157740625*^9, 3.556891660140625*^9, 3.556891773765625*^9, 
  3.5682338728523273`*^9, 3.568234836100422*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.25`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.25`\\)\[NoBreak] is not a valid value for \
an attribute in an XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538722569572625*^9, 3.5389775637865267`*^9, 
  3.5547158280305786`*^9, 3.555948850984375*^9, 3.55594916653125*^9, 
  3.555949305953125*^9, 3.55594939765625*^9, 3.555988292309985*^9, 
  3.5559900813977304`*^9, 3.555997021684737*^9, 3.555997509387944*^9, 
  3.55688993596875*^9, 3.556890209359375*^9, 3.556891084859375*^9, 
  3.55689157740625*^9, 3.556891660140625*^9, 3.556891773765625*^9, 
  3.5682338728523273`*^9, 3.5682348361014223`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538722569572625*^9, 3.5389775637865267`*^9, 
  3.5547158280305786`*^9, 3.555948850984375*^9, 3.55594916653125*^9, 
  3.555949305953125*^9, 3.55594939765625*^9, 3.555988292309985*^9, 
  3.5559900813977304`*^9, 3.555997021684737*^9, 3.555997509387944*^9, 
  3.55688993596875*^9, 3.556890209359375*^9, 3.556891084859375*^9, 
  3.55689157740625*^9, 3.556891660140625*^9, 3.556891773765625*^9, 
  3.5682338728523273`*^9, 3.568234836102422*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538722569572625*^9, 3.5389775637865267`*^9, 
  3.5547158280305786`*^9, 3.555948850984375*^9, 3.55594916653125*^9, 
  3.555949305953125*^9, 3.55594939765625*^9, 3.555988292309985*^9, 
  3.5559900813977304`*^9, 3.555997021684737*^9, 3.555997509387944*^9, 
  3.55688993596875*^9, 3.556890209359375*^9, 3.556891084859375*^9, 
  3.55689157740625*^9, 3.556891660140625*^9, 3.556891773765625*^9, 
  3.5682338728523273`*^9, 3.568234836103422*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.375`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.375`\\)\[NoBreak] is not a valid value \
for an attribute in an XMLElement. The value of the attribute must be a \
string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538722569572625*^9, 3.5389775637865267`*^9, 
  3.5547158280305786`*^9, 3.555948850984375*^9, 3.55594916653125*^9, 
  3.555949305953125*^9, 3.55594939765625*^9, 3.555988292309985*^9, 
  3.5559900813977304`*^9, 3.555997021684737*^9, 3.555997509387944*^9, 
  3.55688993596875*^9, 3.556890209359375*^9, 3.556891084859375*^9, 
  3.55689157740625*^9, 3.556891660140625*^9, 3.556891773765625*^9, 
  3.5682338728523273`*^9, 3.5682348361044226`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.538722569572625*^9, 3.5389775637865267`*^9, 
  3.5547158280305786`*^9, 3.555948850984375*^9, 3.55594916653125*^9, 
  3.555949305953125*^9, 3.55594939765625*^9, 3.555988292309985*^9, 
  3.5559900813977304`*^9, 3.555997021684737*^9, 3.555997509387944*^9, 
  3.55688993596875*^9, 3.556890209359375*^9, 3.556891084859375*^9, 
  3.55689157740625*^9, 3.556891660140625*^9, 3.556891773765625*^9, 
  3.5682338728523273`*^9, 3.5682348361054225`*^9}],

Cell[BoxData["\<\"AeroFlightRecorder.xml\"\>"], "Output",
 CellChangeTimes->{3.538722569603875*^9, 3.538977563833402*^9, 
  3.554715828046171*^9, 3.5559488528125*^9, 3.55594916675*^9, 
  3.55594930634375*^9, 3.5559493976875*^9, 3.5559882935447235`*^9, 
  3.5559900850227766`*^9, 3.555997022762966*^9, 3.5559975094191957`*^9, 
  3.556889940375*^9, 3.556890209515625*^9, 3.556891086921875*^9, 
  3.55689158534375*^9, 3.556891660421875*^9, 3.55689177378125*^9, 
  3.5682338728713284`*^9, 3.5682348361064224`*^9}]
}, Open  ]]
}, Closed]]
}, Open  ]]
},
WindowSize->{936, 566},
WindowMargins->{{170, Automatic}, {Automatic, -41}},
FrontEndVersion->"8.0 for Microsoft Windows (64-bit) (October 6, 2011)",
StyleDefinitions->FrontEnd`FileName[{"Creative"}, "NaturalColor.nb", 
  CharacterEncoding -> "WindowsANSI"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[579, 22, 164, 2, 65, "Title"],
Cell[746, 26, 377, 6, 41, "Input"],
Cell[1126, 34, 124, 3, 41, "Input"],
Cell[CellGroupData[{
Cell[1275, 41, 151, 2, 23, "Subtitle"],
Cell[1429, 45, 1252, 29, 182, "Input"],
Cell[2684, 76, 2110, 49, 242, "Input"],
Cell[4797, 127, 2656, 63, 282, "Input"],
Cell[7456, 192, 945, 23, 122, "Input"],
Cell[CellGroupData[{
Cell[8426, 219, 212, 7, 65, "Input"],
Cell[8641, 228, 925, 18, 62, "Output"]
}, Open  ]],
Cell[9581, 249, 1695, 38, 202, "Input"],
Cell[11279, 289, 1439, 36, 82, "Input"],
Cell[12721, 327, 1102, 28, 122, "Input"],
Cell[CellGroupData[{
Cell[13848, 359, 176, 3, 41, "Input"],
Cell[14027, 364, 995, 18, 56, "Message"],
Cell[15025, 384, 993, 18, 56, "Message"],
Cell[16021, 404, 982, 17, 56, "Message"],
Cell[17006, 423, 784, 15, 21, "Message"],
Cell[17793, 440, 3418, 53, 158, "Message"],
Cell[21214, 495, 714, 14, 21, "Message"],
Cell[21931, 511, 863, 16, 39, "Message"],
Cell[22797, 529, 714, 14, 21, "Message"],
Cell[23514, 545, 863, 16, 39, "Message"],
Cell[24380, 563, 714, 14, 21, "Message"],
Cell[25097, 579, 788, 15, 21, "Message"],
Cell[25888, 596, 859, 16, 39, "Message"],
Cell[26750, 614, 789, 15, 21, "Message"],
Cell[27542, 631, 261, 3, 40, "Output"]
}, Closed]]
}, Open  ]],
Cell[CellGroupData[{
Cell[27852, 640, 204, 3, 23, "Subtitle"],
Cell[28059, 645, 1307, 30, 182, "Input"],
Cell[29369, 677, 1647, 37, 182, "Input"],
Cell[31019, 716, 1713, 37, 182, "Input"],
Cell[32735, 755, 628, 15, 82, "Input"],
Cell[33366, 772, 1104, 25, 62, "Input"],
Cell[34473, 799, 806, 19, 82, "Input"],
Cell[CellGroupData[{
Cell[35304, 822, 176, 3, 41, "Input"],
Cell[35483, 827, 3689, 56, 158, "Message"],
Cell[39175, 885, 734, 14, 21, "Message"],
Cell[39912, 901, 855, 16, 21, "Message"],
Cell[40770, 919, 736, 14, 21, "Message"],
Cell[41509, 935, 851, 15, 21, "Message"],
Cell[42363, 952, 736, 14, 21, "Message"],
Cell[43102, 968, 810, 15, 21, "Message"],
Cell[43915, 985, 857, 16, 21, "Message"],
Cell[44775, 1003, 811, 15, 21, "Message"],
Cell[45589, 1020, 289, 4, 40, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[45927, 1030, 248, 3, 23, "Subtitle"],
Cell[46178, 1035, 1346, 31, 182, "Input"],
Cell[47527, 1068, 832, 18, 82, "Input"],
Cell[48362, 1088, 502, 11, 62, "Input"],
Cell[48867, 1101, 766, 13, 41, "Input"],
Cell[CellGroupData[{
Cell[49658, 1118, 176, 3, 41, "Input"],
Cell[49837, 1123, 483, 10, 21, "Message"],
Cell[50323, 1135, 1166, 19, 56, "Message"],
Cell[51492, 1156, 458, 10, 21, "Message"],
Cell[51953, 1168, 605, 12, 39, "Message"],
Cell[52561, 1182, 458, 10, 21, "Message"],
Cell[53022, 1194, 605, 12, 39, "Message"],
Cell[53630, 1208, 458, 10, 21, "Message"],
Cell[54091, 1220, 532, 11, 21, "Message"],
Cell[54626, 1233, 340, 5, 40, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[55015, 1244, 140, 2, 23, "Subtitle"],
Cell[55158, 1248, 1103, 28, 182, "Input"],
Cell[56264, 1278, 1048, 24, 122, "Input"],
Cell[57315, 1304, 788, 19, 122, "Input"],
Cell[58106, 1325, 403, 9, 82, "Input"],
Cell[58512, 1336, 108, 2, 41, "Input"],
Cell[58623, 1340, 617, 20, 76, "Input"],
Cell[CellGroupData[{
Cell[59265, 1364, 403, 13, 76, "Input"],
Cell[59671, 1379, 495, 11, 58, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[60203, 1395, 34, 0, 41, "Input"],
Cell[60240, 1397, 647, 16, 58, "Output"]
}, Open  ]],
Cell[60902, 1416, 111, 2, 41, "Input"],
Cell[61016, 1420, 234, 6, 41, "Input"],
Cell[61253, 1428, 359, 11, 131, "Input"],
Cell[61615, 1441, 295, 7, 41, "Input"],
Cell[CellGroupData[{
Cell[61935, 1452, 108, 1, 41, "Input"],
Cell[62046, 1455, 634, 16, 58, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[62717, 1476, 965, 29, 59, "Input"],
Cell[63685, 1507, 1059, 22, 65, "Output"]
}, Open  ]],
Cell[64759, 1532, 171, 4, 41, "Input"],
Cell[CellGroupData[{
Cell[64955, 1540, 63, 1, 41, "Input"],
Cell[65021, 1543, 862, 16, 21, "Message"],
Cell[65886, 1561, 809, 15, 21, "Message"],
Cell[66698, 1578, 809, 15, 21, "Message"],
Cell[67510, 1595, 809, 15, 21, "Message"],
Cell[68322, 1612, 857, 16, 21, "Message"],
Cell[69182, 1630, 2469, 38, 107, "Message"],
Cell[71654, 1670, 788, 15, 21, "Message"],
Cell[72445, 1687, 903, 16, 21, "Message"],
Cell[73351, 1705, 786, 15, 21, "Message"],
Cell[74140, 1722, 903, 16, 21, "Message"],
Cell[75046, 1740, 788, 15, 21, "Message"],
Cell[75837, 1757, 862, 16, 21, "Message"],
Cell[76702, 1775, 905, 16, 21, "Message"],
Cell[77610, 1793, 865, 16, 21, "Message"],
Cell[78478, 1811, 213, 3, 40, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[78740, 1820, 188, 3, 23, "Subtitle"],
Cell[78931, 1825, 1137, 27, 182, "Input"],
Cell[80071, 1854, 1284, 29, 142, "Input"],
Cell[81358, 1885, 849, 20, 122, "Input"],
Cell[82210, 1907, 403, 9, 82, "Input"],
Cell[82616, 1918, 108, 2, 41, "Input"],
Cell[82727, 1922, 455, 12, 57, "Input"],
Cell[83185, 1936, 295, 7, 41, "Input"],
Cell[CellGroupData[{
Cell[83505, 1947, 108, 1, 41, "Input"],
Cell[83616, 1950, 544, 14, 57, "Output"]
}, Open  ]],
Cell[84175, 1967, 234, 6, 41, "Input"],
Cell[84412, 1975, 171, 4, 41, "Input"],
Cell[CellGroupData[{
Cell[84608, 1983, 63, 1, 41, "Input"],
Cell[84674, 1986, 650, 13, 21, "Message"],
Cell[85327, 2001, 599, 12, 21, "Message"],
Cell[85929, 2015, 599, 12, 21, "Message"],
Cell[86531, 2029, 601, 12, 21, "Message"],
Cell[87135, 2043, 645, 13, 21, "Message"],
Cell[87783, 2058, 2243, 34, 107, "Message"],
Cell[90029, 2094, 578, 12, 21, "Message"],
Cell[90610, 2108, 695, 13, 21, "Message"],
Cell[91308, 2123, 576, 12, 21, "Message"],
Cell[91887, 2137, 693, 13, 21, "Message"],
Cell[92583, 2152, 576, 12, 21, "Message"],
Cell[93162, 2166, 650, 13, 21, "Message"],
Cell[93815, 2181, 695, 13, 21, "Message"],
Cell[94513, 2196, 653, 13, 21, "Message"],
Cell[95169, 2211, 216, 3, 40, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[95434, 2220, 309, 5, 23, "Subtitle"],
Cell[95746, 2227, 170, 4, 29, "Text"],
Cell[95919, 2233, 1253, 29, 182, "Input"],
Cell[97175, 2264, 3794, 78, 302, "Input"],
Cell[100972, 2344, 7671, 170, 842, "Input"],
Cell[108646, 2516, 2880, 64, 302, "Input"],
Cell[CellGroupData[{
Cell[111551, 2584, 199, 5, 57, "Input"],
Cell[111753, 2591, 354, 4, 40, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[112144, 2600, 197, 5, 59, "Input"],
Cell[112344, 2607, 351, 4, 40, "Output"]
}, Open  ]],
Cell[112710, 2614, 11893, 367, 786, "Input"],
Cell[CellGroupData[{
Cell[124628, 2985, 4466, 113, 322, "Input"],
Cell[129097, 3100, 12328, 375, 479, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[141462, 3480, 63, 1, 41, "Input"],
Cell[141528, 3483, 3682, 57, 158, "Message"],
Cell[145213, 3542, 1027, 18, 21, "Message"],
Cell[146243, 3562, 1176, 20, 39, "Message"],
Cell[147422, 3584, 1027, 18, 21, "Message"],
Cell[148452, 3604, 1176, 20, 39, "Message"],
Cell[149631, 3626, 1027, 18, 21, "Message"],
Cell[150661, 3646, 1101, 19, 21, "Message"],
Cell[151765, 3667, 1173, 20, 39, "Message"],
Cell[152941, 3689, 1101, 19, 21, "Message"],
Cell[154045, 3710, 669, 9, 40, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[154763, 3725, 100, 2, 23, "Subtitle",
 Evaluatable->False],
Cell[154866, 3729, 1302, 30, 182, "Input"],
Cell[156171, 3761, 118, 3, 41, "Input"],
Cell[156292, 3766, 992, 25, 142, "Input"],
Cell[157287, 3793, 979, 23, 142, "Input"],
Cell[158269, 3818, 251, 6, 41, "Input"],
Cell[158523, 3826, 634, 15, 122, "Input"],
Cell[159160, 3843, 181, 4, 41, "Input"],
Cell[159344, 3849, 281, 8, 82, "Input"],
Cell[159628, 3859, 299, 7, 82, "Input"],
Cell[159930, 3868, 143, 4, 41, "Input"],
Cell[CellGroupData[{
Cell[160098, 3876, 63, 1, 41, "Input"],
Cell[160164, 3879, 677, 13, 70, "Message"],
Cell[160844, 3894, 680, 13, 70, "Message"],
Cell[161527, 3909, 678, 13, 70, "Message"],
Cell[162208, 3924, 674, 13, 70, "Message"],
Cell[162885, 3939, 3253, 49, 70, "Message"],
Cell[166141, 3990, 606, 12, 70, "Message"],
Cell[166750, 4004, 721, 13, 70, "Message"],
Cell[167474, 4019, 606, 12, 70, "Message"],
Cell[168083, 4033, 719, 13, 70, "Message"],
Cell[168805, 4048, 604, 12, 70, "Message"],
Cell[169412, 4062, 678, 13, 70, "Message"],
Cell[170093, 4077, 751, 14, 70, "Message"],
Cell[170847, 4093, 681, 13, 70, "Message"],
Cell[171531, 4108, 250, 3, 70, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[171830, 4117, 166, 3, 23, "Subtitle",
 Evaluatable->False],
Cell[171999, 4122, 1337, 29, 182, "Input"],
Cell[173339, 4153, 118, 3, 41, "Input"],
Cell[173460, 4158, 884, 21, 122, "Input"],
Cell[174347, 4181, 442, 10, 82, "Input"],
Cell[174792, 4193, 870, 20, 122, "Input"],
Cell[CellGroupData[{
Cell[175687, 4217, 199, 5, 57, "Input"],
Cell[175889, 4224, 262, 3, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[176188, 4232, 197, 5, 59, "Input"],
Cell[176388, 4239, 260, 3, 70, "Output"]
}, Open  ]],
Cell[176663, 4245, 312, 7, 41, "Input"],
Cell[176978, 4254, 1152, 26, 166, "Input"],
Cell[178133, 4282, 181, 4, 41, "Input"],
Cell[178317, 4288, 143, 4, 41, "Input"],
Cell[CellGroupData[{
Cell[178485, 4296, 63, 1, 41, "Input"],
Cell[178551, 4299, 676, 13, 70, "Message"],
Cell[179230, 4314, 674, 13, 70, "Message"],
Cell[179907, 4329, 676, 13, 70, "Message"],
Cell[180586, 4344, 670, 13, 70, "Message"],
Cell[181259, 4359, 2605, 41, 70, "Message"],
Cell[183867, 4402, 599, 12, 70, "Message"],
Cell[184469, 4416, 719, 13, 70, "Message"],
Cell[185191, 4431, 602, 12, 70, "Message"],
Cell[185796, 4445, 717, 13, 70, "Message"],
Cell[186516, 4460, 599, 12, 70, "Message"],
Cell[187118, 4474, 673, 13, 70, "Message"],
Cell[187794, 4489, 719, 13, 70, "Message"],
Cell[188516, 4504, 679, 13, 70, "Message"],
Cell[189198, 4519, 369, 5, 70, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[189616, 4530, 501, 8, 23, "Subtitle"],
Cell[190120, 4540, 1333, 29, 182, "Input"],
Cell[191456, 4571, 2162, 40, 142, "Input"],
Cell[193621, 4613, 1733, 34, 142, "Input"],
Cell[195357, 4649, 1659, 34, 142, "Input"],
Cell[197019, 4685, 213, 4, 41, "Input"],
Cell[197235, 4691, 5545, 102, 249, "Input"],
Cell[202783, 4795, 182, 4, 41, "Input"],
Cell[202968, 4801, 238, 6, 41, "Input"],
Cell[CellGroupData[{
Cell[203231, 4811, 63, 1, 41, "Input"],
Cell[203297, 4814, 629, 12, 70, "Message"],
Cell[203929, 4828, 631, 12, 70, "Message"],
Cell[204563, 4842, 631, 12, 70, "Message"],
Cell[205197, 4856, 627, 12, 70, "Message"],
Cell[205827, 4870, 3597, 55, 70, "Message"],
Cell[209427, 4927, 554, 11, 70, "Message"],
Cell[209984, 4940, 672, 12, 70, "Message"],
Cell[210659, 4954, 557, 11, 70, "Message"],
Cell[211219, 4967, 669, 12, 70, "Message"],
Cell[211891, 4981, 554, 11, 70, "Message"],
Cell[212448, 4994, 628, 12, 70, "Message"],
Cell[213079, 5008, 701, 13, 70, "Message"],
Cell[213783, 5023, 631, 12, 70, "Message"],
Cell[214417, 5037, 195, 2, 70, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[214661, 5045, 347, 5, 23, "Subtitle"],
Cell[215011, 5052, 1267, 29, 182, "Input"],
Cell[216281, 5083, 2461, 43, 122, "Input"],
Cell[218745, 5128, 2039, 41, 182, "Input"],
Cell[220787, 5171, 1944, 38, 162, "Input"],
Cell[CellGroupData[{
Cell[222756, 5213, 199, 5, 57, "Input"],
Cell[222958, 5220, 452, 6, 40, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[223447, 5231, 197, 5, 59, "Input"],
Cell[223647, 5238, 457, 6, 40, "Output"]
}, Open  ]],
Cell[224119, 5247, 3366, 65, 64, "Input"],
Cell[227488, 5314, 2101, 41, 162, "Input"],
Cell[CellGroupData[{
Cell[229614, 5359, 63, 1, 41, "Input"],
Cell[229680, 5362, 4004, 60, 158, "Message"],
Cell[233687, 5424, 1127, 20, 21, "Message"],
Cell[234817, 5446, 1244, 21, 21, "Message"],
Cell[236064, 5469, 1127, 20, 21, "Message"],
Cell[237194, 5491, 1240, 21, 21, "Message"],
Cell[238437, 5514, 1125, 20, 21, "Message"],
Cell[239565, 5536, 1199, 21, 21, "Message"],
Cell[240767, 5559, 1242, 21, 21, "Message"],
Cell[242012, 5582, 1204, 21, 21, "Message"],
Cell[243219, 5605, 759, 11, 40, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[244027, 5622, 241, 3, 23, "Subtitle"],
Cell[244271, 5627, 1077, 27, 182, "Input"],
Cell[245351, 5656, 2008, 43, 202, "Input"],
Cell[247362, 5701, 1470, 27, 102, "Input"],
Cell[248835, 5730, 1237, 22, 82, "Input"],
Cell[CellGroupData[{
Cell[250097, 5756, 801, 14, 82, "Input"],
Cell[250901, 5772, 356, 7, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[251294, 5784, 63, 1, 41, "Input"],
Cell[251360, 5787, 3788, 57, 70, "Message"],
Cell[255151, 5846, 876, 16, 70, "Message"],
Cell[256030, 5864, 997, 18, 70, "Message"],
Cell[257030, 5884, 876, 16, 70, "Message"],
Cell[257909, 5902, 995, 17, 70, "Message"],
Cell[258907, 5921, 876, 16, 70, "Message"],
Cell[259786, 5939, 950, 17, 70, "Message"],
Cell[260739, 5958, 999, 18, 70, "Message"],
Cell[261741, 5978, 955, 17, 70, "Message"],
Cell[262699, 5997, 509, 7, 70, "Output"]
}, Open  ]]
}, Closed]]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
